home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / c / date.lha / Date / C / doc / Date.doc < prev    next >
Encoding:
Text File  |  1995-02-04  |  68.3 KB  |  2,925 lines

  1. TABLE OF CONTENTS
  2.  
  3. Date/--background--
  4. Date/--history--
  5. Date/--release--
  6. Date/_DateCleanup
  7. Date/_DateInit
  8. Date/CompareDates
  9. Date/CompareTimes
  10. Date/GregorianDayDiff
  11. Date/GregorianDaysAfterWeekday
  12. Date/GregorianDaysBeforeWeekday
  13. Date/GregorianDiffDate
  14. Date/GregorianEaster
  15. Date/GregorianLeapYear
  16. Date/GregorianMonthDays
  17. Date/GregorianMoonAge
  18. Date/GregorianMoonPhase
  19. Date/GregorianToJD
  20. Date/GregorianWeek
  21. Date/GregorianWeekday
  22. Date/GregorianYearDays
  23. Date/GSYearToJD
  24. Date/GYearToScaliger
  25. Date/HeisDayDiff
  26. Date/HeisDaysAfterWeekday
  27. Date/HeisDaysBeforeWeekday
  28. Date/HeisDiffDate
  29. Date/HeisEaster
  30. Date/HeisLeapYear
  31. Date/HeisMonthDays
  32. Date/HeisToJD
  33. Date/HeisWeek
  34. Date/HeisWeekday
  35. Date/HeisYearDays
  36. Date/HSYearToJD
  37. Date/HYearToScaliger
  38. Date/JDToGregorian
  39. Date/JDToHeis
  40. Date/JDToJulian
  41. Date/JDtoMJD
  42. Date/JDToTime
  43. Date/JSYearToJD
  44. Date/JulianDayDiff
  45. Date/JulianDaysAfterWeekday
  46. Date/JulianDaysBeforeWeekday
  47. Date/JulianDiffDate
  48. Date/JulianEaster
  49. Date/JulianLeapYear
  50. Date/JulianMonthDays
  51. Date/JulianToJD
  52. Date/JulianWeek
  53. Date/JulianWeekday
  54. Date/JulianYearDays
  55. Date/JYearToScaliger
  56. Date/LMT
  57. Date/MJDtoJD
  58. Date/MonthShortText
  59. Date/MonthText
  60. Date/ScaligerYearToG
  61. Date/ScaligerYearToH
  62. Date/ScaligerYearToJ
  63. Date/SecToTime
  64. Date/TimeToJD
  65. Date/TimeToSec
  66. Date/TimeZoneFactor
  67. Date/WeekdayShortText
  68. Date/WeekdayText
  69. Date/--background--                                       Date/--background--
  70.  
  71.    NAME
  72.     Date -- This module was designed to help calc. calendar dates (V33)
  73.  
  74.    FUNCTION
  75.     I know about the date routines in the Amiga-OS(TM), but I decided
  76.     not to use them because of their limited functionalities and of
  77.     the portability of this module!
  78.  
  79.    NOTES
  80.     A tropical year is 365.2422 days! / 365d, 5h, 48min, 46sec
  81.     A moon month is 29.53059 days! / 29d, 12h, 44min, 2.9 sec
  82.     A moon phase is 7.38265 days!
  83.     All calculations are historical and NOT astronomical!
  84.  
  85.     (German) Books which helped me creating this library:
  86.         Kleine Naturwissenschaftliche Bibliothek, Band 23
  87.         Ewige Kalender
  88.         A.W. Butkewitsch & M.S. Selikson
  89.         5. Auflage
  90.         Teubner, Leipzig 1974
  91.         ISBN 3-322-00393-0
  92.  
  93.         Tag und Woche, Monat und Jahr: eine Kulturgeschichte des
  94.         Kalenders
  95.         Rudolf Wendorff
  96.         Westdeutscher, Opladen 1993
  97.         ISBN 3-531-12417-X
  98.  
  99.         Kalender und Chronologie: Bekanntes & Unbekanntes aus der
  100.         Kalenderwissenschaft
  101.         Heinz Zemanek
  102.         4. Auflage
  103.         Oldenbourg, München 1987
  104.         ISBN 3-486-20447-5
  105.  
  106.         Meyers Handbuch
  107.         über das Weltall
  108.         Karl Schaifers & Gerhard Traving
  109.         5. Auflage
  110.         Bibliographisches Institut, Mannheim 1973
  111.         ISBN 3-411-00940-3
  112.  
  113.         Astronomische Algorithmen
  114.         Jean Meeus
  115.         2. Auflage
  116.         Johann Ambrosius Barth, Berlin 1994
  117.         ISBN 3-335-00400-0
  118.  
  119.         Astronomie mit dem Personal Computer
  120.         Oliver Montenbruck & Thomas Pfleger
  121.         2. Auflage
  122.         Springer, Berlin 1994
  123.         ISBN 3-540-57701-7
  124.  
  125.     (English) Books which helped me creating this library:
  126.         Mathematical Astronomy with a Pocket Calculator
  127.         Aubrey Jones Fras
  128.         Unknown (first) Edition
  129.         David & Charles Newton Abbot, London 1978
  130.         ISBN 0-7153-7675-6
  131.  
  132.         Astronomical Algorithms
  133.         Jean Meeus
  134.         Unknown Edition (I use the German second edition ;-)
  135.         Willmann-Bell, Inc., Ruchmond, Virginia (USA) 1991
  136.         ISBN 0-943396-35-2
  137.  
  138.    COPYRIGHT
  139.     This module is Copyright 1994-95 by Kai Hofmann.
  140.     All rights reserved!
  141.     For private use, Public Domain, Gift Ware, Freeware and Shareware
  142.     you could use this module under following conditions:
  143.     - You send me a little gift (money is very welcome :)
  144.         For Bank Account see below - but *ONLY* send in DM
  145.         to this Bank Account!!!
  146.       Other nice gifts: all Amiga hardware, and I am searching for a
  147.       good old 1541 (C64 floppy)
  148.     - You include a notice in your product, that you use this library
  149.       and that it is Copyright by Kai Hofmann!
  150.       And send me a free full version of your product!
  151.     If you want to redistribute this library read the following points:
  152.     - Redistribution warranty is given to:
  153.         Fred Fish for his great Amiga-Software-Library
  154.         The German SAAR AG PD-Library
  155.         The German AMOK PD-Library
  156.         All public accessible INTERNET servers and PHONE boxes!
  157.         All others who do NOT take more than DM 5.- for one disk
  158.         ALL others who do NOT take more than DM 50.- for one CD
  159.     For commercial use send me DM 200.- and a free version of your
  160.     product!
  161.     But if you are Apple or Microsoft you have to send (20000.- US$)
  162.  
  163.    DISCLAIMER
  164.  
  165.       THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
  166.    APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
  167.    HOLDER AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
  168.    OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
  169.    THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  170.    PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
  171.    PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE
  172.    COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
  173.  
  174.       IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  175.    WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY REDISTRIBUTE THE
  176.    PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
  177.    GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
  178.    USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS
  179.    OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
  180.    THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  181.    PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  182.    POSSIBILITY OF SUCH DAMAGES.
  183.  
  184.    ADDITIONAL INFORMATIONS
  185.     I have tried to make portable/useful and I hope bugfree software
  186.     for eternity - but this seems to be impossible (sorry!) :)
  187.     So I hope you will pay a fee for this.
  188.  
  189.    AUTHOR
  190.     Kai Hofmann
  191.     Arberger Heerstraße 92
  192.     28307 Bremen
  193.     Germany
  194.     EMail: i07m@zfn.uni-bremen.de
  195.            i07m@informatik.uni-bremen.de
  196.     IRC  : PowerStat
  197.     WWW  : http://www.informatik.uni-bremen.de/~i07m/
  198.     (no phone - I hate it!)
  199.  
  200.     Bank account : 1203 7503
  201.     Account owner: Kai Hofmann
  202.     Bank code    : 290 501 01
  203.     Bank name    : Sparkasse in Bremen
  204.  
  205.     THANX
  206.     Thanx are going to the following people:
  207.     Daniel Amor        - For his hint about the Oberon-2 SHORT
  208.                   command
  209.     Heinz Zemanek        - For his great book
  210.     Christian Schaefer    - For spending time on this lib with his
  211.                   Borland C++ 4.0 compiler
  212.     Rita Reichl        - For correcting my bad english ;-)
  213.     Jim Rickman        - For reporting a bug
  214.  
  215. Date/--history--                                             Date/--history--
  216.  
  217.    NAME
  218.     history -- This is the development history of the Date module
  219.  
  220.    VERSION
  221.     $VER: Date 33.100 (04.02.1995)
  222.  
  223.    HISTORY
  224.     16.01.1994 -    Procedures: JulianLeapYear(), GregorianLeapYear() &
  225.             HeisLeapYear() initiated.
  226.     22.01.1994 -    Procedures: JulianMonthDays(), GregorianMonthDays(),
  227.             HeisMonthDays(), JulianYearDays(),
  228.             GregorianYearDays(), HeisYearDays(), JulianDayDiff(),
  229.             GregorianDayDiff(), HeisDayDiff(),
  230.             JulianDaySmaller(), GregorianDaySmaller(),
  231.             HeisDaySmaller(), JulianWeekday(),
  232.             GregorianWeekday(), HeisWeekday(),
  233.             JulianDaysBeforeWeekday(),
  234.             GregorianDaysBeforeWeekday(),
  235.             HeisDaysBeforeWeekday(), JulianDaysAfterWeekday(),
  236.             GregorianDaysAfterWeekday(), HeisDaysAfterWeekday(),
  237.             JulianDiffDate(), FreeDate() initiated.
  238.             Types: Weekdays, Date, DatePtr initiated.
  239.             Vars of Gregorian reform initiated
  240.             (for changing to different countries)
  241.     23.01.1994 -    Procedures: JulianDiffDate() finished,
  242.             GregorianDiffDate(), HeisDiffDate(),
  243.             JYearToScaliger(), GYearToScaliger(),
  244.             HYearToScaliger(), ScaligerYearToJ(),
  245.             ScaligerYearToG(), ScaligerYearToH(), JSYearToJD(),
  246.             GSYearToJD(), HSYearToJD(), JDtoMJD(), MJDtoJD(),
  247.             JulianToJD(), GregorianToJD(), HeisToJD(),
  248.             TimeToJD(), JDToTime(), FreeTime() initiated.
  249.             Types: Time, TimePtr initiated.
  250.     28.01.1994 -    Procedures: GregorianMoonAge(), MoonMonthAge(),
  251.             GregorianEaster() initiated.
  252.     30.01.1994 -    Procedures: JulianDiffDate(), GregorianDiffDate(),
  253.             HeisDiffDate(), JDToTime(), GregorianEaster() edited
  254.             (changing return value from ptr to VAL variables).
  255.             Procedures: FreeDate(), FreeTime() deleted.
  256.             Types: Date, DatePtr, Time, TimePtr deleted (not
  257.             longer needed, because of the procedure changes).
  258.             Procedures: GregorianMoonAge(), GregorianEaster()
  259.             changed    year parameter from CARDINAL to INTEGER
  260.             (this is more consistent to the rest of the library).
  261.             Bugs removed: GregorianWeekday(), HeisWeekday()
  262.             (before removing, the weekday for leapyears was
  263.             wrong)
  264.             Procedure: GregorianEaster() finished.
  265.     30.01.1994 -    Ported to Oberon-2
  266.     31.01.1994 -    Compiled with Oberon-2 V3.11
  267.     12.02.1994 -    Procedures: TimeZoneFactor(), LMT(), TimeToSec(),
  268.             SecToTime() initiated.
  269.             Version-String installed :)
  270.     12.02.1994 -    Starting translation to SAS C 6.51
  271.             Date.h translated
  272.     13.02.1994 -    Continuation of C translation
  273.     17.02.1994 -    New Oberon-2 Port, because yesterday Daniel Amor
  274.             gives me a small hint about the SHORT command
  275.             (I did not know about this!)
  276.     17.02.1994 -    Small bug in Autodocs removed
  277.             making this text as Date/--history-- autodoc
  278.     17.02.1994 -    Continuation of C translation
  279.     18.02.1994 -    Finished with C translation
  280.     19.02.1994 -    C bugs removed (thanks to SAS for helping a C Lamer
  281.             like me!), some optimizations done too.
  282.     19.02.1994 -    Oberon-2 version compiled with V40.17 includes
  283.     21.02.1994 -    Starting to write Modula-II testmodule
  284.             Vars for the begining of Heis calculation initiated.
  285.             Fixed small bugs in GregorianWeekday(),
  286.             HeisWeekday(), TimeToSec(), SecToTime()
  287.             Return-value of LMT() changed to LONGINT!
  288.             Converting testmodule to Oberon-2
  289.     22.02.1994 -    Converting testmodule to C
  290.     23.02.1994 -    I noticed, that I forgot the 3 functions
  291.             JulianWeek(), GregorianWeek(), HeisWeek()
  292.     24.02.1994 -    Initiated the 3 forgotten functions
  293.     26.02.1994 -    Initiating new GregorianEaster() with
  294.             Gauß-algorithms    but ONLY for 1900-2099!
  295.     27.02.1994 -    Bug fixed in JulianWeekday()
  296.             Bugs fixed in JulianDayDiff(), GregorianDayDiff(),
  297.             HeisDayDiff()
  298.             JulianDayGreater(), GregorianDayGreater(),
  299.             HeisDayGreater() Initiated.
  300.     02.03.1994 -    Small bug fixed in HeisDayDiff()
  301.             Bugs from 27.02. fixed in Modula-II and Oberon-2
  302.             versions
  303.             I found the way to extend GregorianEaster() !
  304.             Little bug fixed in JulianWeek(), GregorianWeek(),
  305.             HeisWeek() (~(M2) is not !(C))
  306.     05.03.1994 -    Some internal bugs removed
  307.             New internal procedures GregorianSB(),
  308.             GregorianJHSB(), GregorianJHStartSB() !
  309.             Extending GregorianEaster() :)
  310.     11.03.1994 -    Things from 05.03. done in Modula-II and Oberon
  311.     12.03.1994 -    If __SASC is defined autoinitialization instead of
  312.             _DateInit() will be used!
  313.     13.03.1994 -    After studying the SAS C Manual again I decided to
  314.             check for __SASC_650 instead of __SASC because of
  315.             the available priorities!
  316.             Setting the priority of _DateInit() for
  317.             autoinitialization to 600!
  318.     15.03.1994 -    Making Date as library
  319.     16.03.1994 -    Some work on the Autodocs was done,
  320.             eliminating OldGregorianEaster() by comments
  321.             (ANSI: STOP bad standards like that there are NO
  322.              nested comments possible in C!!!).
  323.     19.03.1994 -    Some work on the Autodocs was done in the M2 Code.
  324.     20.03.1994 -    Some work on the Autodocs was done in the Oberon Code
  325.     22.03.1994 -    In JDtoMJD(), MJDtoJD() an L was added to the
  326.             constant.
  327.             In GregorianWeekday(), HeisWeekday(),
  328.             JulianDiffDate(), GregorianDiffDate(),
  329.             HeisDiffDate(), JDToTime() I have inserted
  330.             conversions (found with Borland C++ 4.0).
  331.     24.03.1994 -    Making SunOS4.1.3, SunOS5.3(Solaris2.3) &
  332.             RS6000 AIX3.2.? binaries with gcc.
  333.             Eliminating nested commends by inserting a space
  334.             between / and * (I hate this ANSI C standard
  335.             feature for commends :(
  336.     27.03.1994 -    Adding library register assignments to the autodocs.
  337.     03.04.1994 -    Small fixes for the SAS C++ Compiler
  338.             Small bug fixed in the M2 version of
  339.             GregorianEaster()
  340.     04.04.1994 -    Adding some 'static' keywords.
  341.     10.04.1994 -    Changing from Shareware to Gift Ware ;-)
  342.     02.08.1994 -    Small fixes in the Autodocs (thanks to Rita Reichl
  343.             for correcting my bad english ;-)
  344.     11.08.1994 -    Again small fixes in the Autodocs!
  345.     13.11.1994 -    Small fix in JulianWeek(),GregorianWeek(),HeisWeek().
  346.             Thanks to Jim Rickman for reporting the bug!
  347.             Small changes in the Autodocs!
  348.     30.11.1994 -    Fix the bug from 13.11. in M2 and Oberon code.
  349.     04.12.1994 -    Small fixes in the C-Autodocs.
  350.     12.12.1994 -    Adding WeekdayText(), MonthText() and internal
  351.             max().
  352.     13.12.1994 -    Optimizing WeekdayText() and MonthText()
  353.     14.12.1994 -    Adding WeekdayShortText() and MonthShortText(),
  354.             and fixing the french text.
  355.     17.12.1994 -    Two small changes in the copyright conditions!
  356.     18.12.1994 -    Fix for Amiga init library
  357.     10.01.1995 -    Installing TurboText 2.0
  358.     11.01.1995 -    Found a new (German) book!
  359.     13.01.1995 -    Introducing release history
  360.     14.01.1995 -    Introducing to do list
  361.     15.01.1995 -    Procedures: JDToJulian(), JDToGregorian(),
  362.             JDToHeis() as dummy, JulianEaster() initiated.
  363.             Procedure: OldGregorianEaster() removed.
  364.             Initiating an alternate GregorianEaster() and a
  365.             dummy HeisEaster().
  366.     16.01.1995 -    Procedure: GregorianMoonPhase initiated.
  367.             I decided not longer to support Modula-II and Oberon
  368.             version, until someone asks for it!
  369.     17.01.1995 -    Internal procedure: GregorianMoonPhaseHelp.
  370.             Adding a note to the background.
  371.             Correcting small bug in autodocs.
  372. 18.01.1995 -    Found a new (German) book!
  373.     20.01.1995 -    Rita Reichl found David F. Skoll's Reminder3.0 -
  374.             I am so impressed, that I could not continue my
  375.             work for one day ;-)
  376.     21.01.1995 -    I decide to distribute my TextEngine with the date
  377.             library, when I have finished it.
  378.     28.01.1995 -    Adding 'static' to GregorianMoonPhaseHelp.
  379.             Fixing a very small bug.
  380.     01.02.1995 -    Replacing JulianDaySmaller(), GregorianDaySmaller(),
  381.             HeisDaySmaller(), JulianDayGreater(),
  382.             GregorianDayGreater(), HeisDayGreater() with the new
  383.             CompareDates()!
  384.             Procedure: CompareTimes() initiated.
  385.     04.02.1995 -    Adding some things to the autodocs.
  386.  
  387. Date/--release--                                             Date/--release--
  388.  
  389.    NAME
  390.     release -- This is the release history of the Date module
  391.  
  392.    RELEASE
  393.     13.04.1994 : 33.087 -    V1.0 First release on Aminet3 & SaarAG 707
  394.     13.08.1994 : 33.088 -    V1.1 Second release on Aminet4, SaarAG 793,
  395.                      Fred Fish & SimTel
  396.     18.12.1994 : 33.093 -    V1.2 Third release on Aminet
  397.     06.02.1995 : 33.100 -    V1.3 Fourth release on Aminet
  398.  
  399. Date/_DateCleanup                                           Date/_DateCleanup
  400.  
  401.    NAME
  402.     _DateCleanup -- Procedure to cleanup this module! (V33)
  403.  
  404.    SYNOPSIS
  405.     _DateCleanup();
  406.  
  407.     void _DateCleanup(void);
  408.  
  409.    FUNCTION
  410.     Cleanup this module, after using!
  411.  
  412.    INPUTS
  413.     None.
  414.  
  415.    RESULT
  416.     None.
  417.  
  418.    EXAMPLE
  419.     ...
  420.     _DateCleanup();
  421.     ...
  422.  
  423.    NOTES
  424.     This function is only needed/available if you do not compile this
  425.     with a SAS C Compiler (using Autoinitialization!)
  426.     If you are not using SASC - don't forget to cleanup this module with
  427.     this function - or you will get into trouble!!!
  428.  
  429.    BUGS
  430.     unknown.
  431.  
  432.    SEE ALSO
  433.  
  434.  
  435. Date/_DateInit                                                 Date/_DateInit
  436.  
  437.    NAME
  438.     _DateInit -- Procedure to initialize this module! (V33)
  439.  
  440.    SYNOPSIS
  441.     _DateInit();
  442.  
  443.     void _DateInit(void);
  444.  
  445.    FUNCTION
  446.     Initialize this module, like the modulebody in Modula-II or Oberon-2
  447.  
  448.    INPUTS
  449.     None.
  450.  
  451.    RESULT
  452.     None.
  453.  
  454.    EXAMPLE
  455.     ...
  456.     _DateInit();
  457.     ...
  458.  
  459.    NOTES
  460.     This function is only needed/available if you do not compile this
  461.     with a SAS C Compiler (using Autoinitialization!)
  462.     If you are not using SASC - don't forget to init this module with
  463.     this function - or you will get into trouble!!!
  464.  
  465.    BUGS
  466.     unknown.
  467.  
  468.    SEE ALSO
  469.  
  470.  
  471. Date/CompareDates                                           Date/CompareDates
  472.  
  473.    NAME
  474.     CompareDates -- Compares date1 with date2. (V33.100)
  475.  
  476.    SYNOPSIS
  477.     compare = CompareDates(day1,month1,year1,day2,month2,year2);
  478.       d0            d0    d1    d2    d3    d4    d5
  479.  
  480.     short CompareDates(const unsigned short day1,
  481.         const unsigned short month1, const int year1,
  482.         const unsigned short day2, const unsigned short month2,
  483.         const int year2);
  484.  
  485.    FUNCTION
  486.     CompareDates compares date1 with date2.
  487.  
  488.    INPUTS
  489.     day1   - day of the first date
  490.     month1 - month of the first date
  491.     year1  - year of the first date
  492.     day2   - day of the second date
  493.     month2 - month of the second month
  494.     year2  - year of the second date
  495.  
  496.    RESULT
  497.     compare - -1 : date1 < date2
  498.            0 : date1 = date2
  499.            1 : date1 > date2
  500.  
  501.    EXAMPLE
  502.     ...
  503.     if (CompareDates(18,9,1970,22,1,1994) == -1)
  504.       printf("<\n");
  505.     else
  506.       printf(">=\n");
  507.     ...
  508.  
  509.    NOTES
  510.     It is better only to use this function for years from -7 to 8000!
  511.     There is no need for different versions for Julian, Gregorian and
  512.     Heis dates!
  513.  
  514.    BUGS
  515.     There is no check if the dates are valid!
  516.  
  517.    SEE ALSO
  518.     CompareTimes()
  519.  
  520. Date/CompareTimes                                           Date/CompareTimes
  521.  
  522.    NAME
  523.     CompareTimes -- Compares time1 with time2. (V33.100)
  524.  
  525.    SYNOPSIS
  526.     compare = CompareTimes(hour1,min1,sec1,hour2,min2,sec2);
  527.       d0            d0    d1   d2   d3    d4   d5
  528.  
  529.     short CompareTimes(const unsigned short hour1,
  530.         const unsigned short min1, const unsigned short sec1,
  531.         const unsigned short hour2, const unsigned short min2,
  532.         const unsigned short sec2);
  533.  
  534.    FUNCTION
  535.     CompareTimes compares time1 with time2 (24h format only).
  536.  
  537.    INPUTS
  538.     hour1 - Hour of the first time.
  539.     min1  - Minute of the first time.
  540.     sec1  - Second of the first time.
  541.     hour2 - Hour of the second time.
  542.     min2  - Minute of the second time.
  543.     sec2  - Second of the second time.
  544.  
  545.    RESULT
  546.     compare - -1 : time1 < time2
  547.            0 : time1 = time2
  548.            1 : time1 > time2
  549.  
  550.    EXAMPLE
  551.     ...
  552.     if (CompareTimes(13,10,0,9,0,0) == -1)
  553.       printf("<\n");
  554.     else
  555.       printf(">=\n");
  556.     ...
  557.  
  558.    NOTES
  559.     This compares two times of 24h format!
  560.  
  561.    BUGS
  562.     There is no check if the times are valid times!
  563.  
  564.    SEE ALSO
  565.     CompareDates()
  566.  
  567. Date/GregorianDayDiff                                   Date/GregorianDayDiff
  568.  
  569.    NAME
  570.     GregorianDayDiff -- Calculates the days between 2 dates. (V33)
  571.  
  572.    SYNOPSIS
  573.     days = GregorianDayDiff(day1,month1,year1,day2,month2,year2);
  574.      d0                 d0    d1    d2    d3    d4    d5
  575.  
  576.     long GregorianDayDiff(const unsigned short day1,
  577.         unsigned short month1, int year1, const unsigned short day2,
  578.         unsigned short month2, int year2);
  579.  
  580.    FUNCTION
  581.     GregorianDayDiff gives you back the number of days between
  582.     two specified dates.
  583.  
  584.    INPUTS
  585.     day1   - day of the first date
  586.     month1 - month of the first date
  587.     year1  - year of the first date
  588.     day2   - day of the second date
  589.     month2 - month of the second month
  590.     year2  - year of the second date
  591.  
  592.    RESULT
  593.     days - The number of days between the two dates
  594.         (positive if date1 <= date2).
  595.  
  596.    EXAMPLE
  597.     ...
  598.     days = GregorianDayDiff(18,9,1970,22,1,1994);
  599.     printf("Age of Kai Hofmann in days : %d\n",days);
  600.     ...
  601.  
  602.    NOTES
  603.     It is better only to use this function for years from -7 to 02.3200!
  604.  
  605.    BUGS
  606.     If you use one of the dates 5.10.1582 to 14.10.1582 you will get a
  607.     wrong output because these days don't exist!
  608.  
  609.    SEE ALSO
  610.     GregorianLeapYear(),GregorianMonthDays(),GregorianYearDays(),
  611.     JulianDayDiff(),HeisDayDiff()
  612.  
  613. Date/GregorianDaysAfterWeekday                 Date/GregorianDaysAfterWeekday
  614.  
  615.    NAME
  616.     GregorianDaysAfterWeekday -- Returns the diff to wday after. (V33)
  617.  
  618.    SYNOPSIS
  619.     days = GregorianDaysAfterWeekday(day,month,year,weekday);
  620.      d0                      d0   d1   d2     d3
  621.  
  622.     unsigned short GregorianDaysAfterWeekday(const unsigned short day,
  623.         const unsigned short month, const int year,
  624.         const Weekdays weekday);
  625.  
  626.    FUNCTION
  627.     Returns the days to the weekday after the specified date.
  628.     So if you specify the 22.1.1994 (Saturday) and Thursday
  629.     you get back 5!
  630.     If you specify the 22.1.1994 and Saturday you get back 0
  631.     (the same day)!
  632.  
  633.    INPUTS
  634.     day     - day of the date
  635.     month   - month of the date
  636.     year    - year of the date
  637.     weekday - weekday to search for building difference
  638.  
  639.    RESULT
  640.     days - The days after to the searched weekday.
  641.  
  642.    EXAMPLE
  643.     ...
  644.     days = GregorianDaysAfterWeekday(22,1,1994,Thursday);
  645.     ...
  646.  
  647.    NOTES
  648.     It is better to use this function only from -7 to 3200!
  649.  
  650.    BUGS
  651.     See GregorianWeekday()!
  652.  
  653.    SEE ALSO
  654.     GregorianWeekday(),JulianDaysAfterWeekday(),HeisDaysAfterWeekday()
  655.  
  656. Date/GregorianDaysBeforeWeekday               Date/GregorianDaysBeforeWeekday
  657.  
  658.    NAME
  659.     GregorianDaysBeforeWeekday -- Returns the diff to wday before. (V33)
  660.  
  661.    SYNOPSIS
  662.     days = GregorianDaysBeforeWeekday(day,month,year,weekday);
  663.      d0                   d0  d1    d2    d3
  664.  
  665.     unsigned short GregorianDaysBeforeWeekday(const unsigned short day,
  666.         const unsigned short month, const int year,
  667.         const Weekdays weekday);
  668.  
  669.    FUNCTION
  670.     Returns the days to the weekday before the specified date.
  671.     So if you specify the 22.1.1994 (Saturday) and Thursday
  672.     you get back 2!
  673.     If you specify the 22.1.1994 and Saturday you get back 0
  674.     (the same day)!
  675.  
  676.    INPUTS
  677.     day     - day of the date
  678.     month   - month of the date
  679.     year    - year of the date
  680.     weekday - weekday to search for building difference
  681.  
  682.    RESULT
  683.     days - The days back to the searched weekday (1-7)
  684.         If you get back 8 an error occurs!
  685.  
  686.    EXAMPLE
  687.     ...
  688.     days = GregorianDaysBeforeWeekday(22,1,1994,Thursday);
  689.     ...
  690.  
  691.    NOTES
  692.     It is better to use this function only from -7 to 3200!
  693.  
  694.    BUGS
  695.     See GregorianWeekday()!
  696.  
  697.    SEE ALSO
  698.     GregorianWeekday(),JulianDaysBeforeWeekday(),HeisDaysBeforeWeekday()
  699.  
  700. Date/GregorianDiffDate                                 Date/GregorianDiffDate
  701.  
  702.    NAME
  703.     GregorianDiffDate -- Returns the diff date to another date. (V33)
  704.  
  705.    SYNOPSIS
  706.     GregorianDiffDate(day,month,year,diffdays,dday,dmonth,dyear);
  707.                d0   d1   d2     d3     a0    a1    a2
  708.  
  709.     void GregorianDiffDate(const unsigned short day,
  710.         const unsigned short month, const int year, int days,
  711.         unsigned short *dday, unsigned short *dmonth, int *dyear);
  712.  
  713.    FUNCTION
  714.     Returns the date which lies diffdays before/after the specified date.
  715.  
  716.    INPUTS
  717.     day      - day of the date
  718.     month    - month of the date
  719.     year     - year of the date
  720.     diffdays - difference to the date in days
  721.  
  722.    RESULT
  723.     dday   - Destination day
  724.     dmonth - Destination month
  725.     dyear  - Destination year
  726.  
  727.    EXAMPLE
  728.     ...
  729.     GregorianDiffDate(23,1,1994,7,&dday,&dmonth,&dyear);
  730.     ...
  731.  
  732.    NOTES
  733.     It is better to use this function only from -7 to 3200!
  734.  
  735.    BUGS
  736.     unknown.
  737.  
  738.    SEE ALSO
  739.     GregorianDayDiff(),GregorianMonthDays(),JulianDiffDate(),
  740.     HeisDiffDate()
  741.  
  742. Date/GregorianEaster                                     Date/GregorianEaster
  743.  
  744.    NAME
  745.     GregorianEaster -- Returns the date of eastern in a year (V33)
  746.  
  747.    SYNOPSIS
  748.     GregorianEaster(year,dday,dmonth);
  749.              d0   a0    a1
  750.  
  751.     void GregorianEaster(const int year, unsigned short *dday,
  752.         unsigned short *dmonth);
  753.  
  754.    FUNCTION
  755.     Returns the date of eastern for a specified year.
  756.  
  757.    INPUTS
  758.     year  - eastern is calculated for this year
  759.  
  760.    RESULT
  761.     dday   - day of easter-Sunday
  762.     dmonth - month of easter-Sunday
  763.  
  764.    EXAMPLE
  765.     ...
  766.     GregorianEaster(1994,&dday,&dmonth);
  767.     ...
  768.  
  769.    NOTES
  770.     Use this only for 31 to 2099!
  771.  
  772.    BUGS
  773.     None.
  774.  
  775.    SEE ALSO
  776.     JulianEaster(),HeisEaster()
  777.  
  778. Date/GregorianLeapYear                                 Date/GregorianLeapYear
  779.  
  780.    NAME
  781.     GregorianLeapYear -- Checks if a year is a leap year. (V33)
  782.  
  783.    SYNOPSIS
  784.     leapyear = GregorianLeapYear(year);
  785.        d0                  d0
  786.  
  787.     bool GregorianLeapYear(const int year);
  788.  
  789.    FUNCTION
  790.     GregorianLeapYear checks if a year is a leap year.
  791.     For years after 1582 all years devideable by 4 are leap years,
  792.     without years devideable by 100, but years devideable by 400
  793.     are leap years again!
  794.     For years before 1582 see JulianLeapYear().
  795.  
  796.    INPUTS
  797.     year - The year which should be checked (from -32768 to 32767)
  798.         I think only values from -7 to 3200 are valid, because of
  799.         the variant that was done on -8 by Augustus and other things!
  800.  
  801.    RESULT
  802.     leapyear - TRUE if the year is a leap year, otherwise false.
  803.  
  804.    EXAMPLE
  805.     ...
  806.     if (GregorianLeapYear(1994))
  807.       printf("leap year!\n");
  808.     else
  809.       printf("no leap year!\n");
  810.     ...
  811.  
  812.    NOTES
  813.     A year is 365.2425 days long!
  814.     Use this function only for values from -7 to 3199!
  815.  
  816.    BUGS
  817.     No known bugs.
  818.  
  819.    SEE ALSO
  820.     JulianLeapYear(),HeisLeapYear()
  821.  
  822. Date/GregorianMonthDays                               Date/GregorianMonthDays
  823.  
  824.    NAME
  825.     GregorianMonthDays -- Gives back the number of days of a month. (V33)
  826.  
  827.    SYNOPSIS
  828.     days = GregorianMonthDays(month,year);
  829.      d0               d0    d1
  830.  
  831.     unsigned short GregorianMonthDays(const unsigned short month,
  832.         const int year);
  833.  
  834.    FUNCTION
  835.     GregorianMonthDays gives you back the number of days a month in
  836.     a specified year has.
  837.     For the year 1582 and the month 10 there are only 21 days,
  838.     because of the Gregorian-reform 10 days are deleted from
  839.     the month (for more - look out for books about this!)
  840.  
  841.    INPUTS
  842.     month - The month from which you want to get the number of days.
  843.     year  - The year in which the month is.
  844.  
  845.    RESULT
  846.     days - The number of days the month uses, or 0 if you use
  847.         a wrong month.
  848.  
  849.    EXAMPLE
  850.     ...
  851.     days = GregorianMonthDays(1,1994);
  852.     printf("Days of January 1994 : %d\n",days);
  853.     ...
  854.  
  855.    NOTES
  856.     Use this function only for years from -7 to 3199!
  857.  
  858.    BUGS
  859.     none.
  860.  
  861.    SEE ALSO
  862.     GregorianLeapYear(),JulianMonthDays(),HeisMonthDays()
  863.  
  864. Date/GregorianMoonAge                                   Date/GregorianMoonAge
  865.  
  866.    NAME
  867.     GregorianMoonAge -- Returns the age of the moon (V33)
  868.  
  869.    SYNOPSIS
  870.     ep = GregorianMoonAge(day,month,year);
  871.     d0               d0   d1   d2
  872.  
  873.     unsigned short GregorianMoonAge(const unsigned short day,
  874.         const unsigned short month, const int year);
  875.  
  876.    FUNCTION
  877.     Returns the age of the moon on a specified date.
  878.  
  879.    INPUTS
  880.     day   - For this day the age is calculated.
  881.     month - For this month the age is calculated.
  882.     year  - For this year the age is calculated.
  883.  
  884.    RESULT
  885.     ep - The age of the moon on the specified date.
  886.  
  887.    EXAMPLE
  888.     ...
  889.     ep = GregorianMoonAge(18,9,1994);
  890.     ...
  891.  
  892.    NOTES
  893.     Use this only for 1582 to 4100!
  894.     This is only a experimental version!
  895.  
  896.    BUGS
  897.     unknown.
  898.  
  899.    SEE ALSO
  900.     MoonMonthAge(),GregorianEP(),GregorianMoonPhase()
  901.  
  902. Date/GregorianMoonPhase                               Date/GregorianMoonPhase
  903.  
  904.    NAME
  905.     GregorianMoonPhase -- Searches for the next moon phase (V33.098)
  906.  
  907.    SYNOPSIS
  908.     jd = GregorianMoonPhase(day,month,year,phase);
  909.     d0                d0   d1    d2   d3
  910.  
  911.     unsigned long GregorianMoonPhase(const unsigned short day,
  912.         const unsigned short month, const int year,
  913.         const MoonPhases phase);
  914.  
  915.    FUNCTION
  916.     Returns the next moon phase you are searching for after
  917.     an specified date.
  918.  
  919.    INPUTS
  920.     day   - Start day for the search.
  921.     month - Start month for the search.
  922.     year  - Start year for the search.
  923.     phase - The moon phase you want to know.
  924.  
  925.    RESULT
  926.     jd - The day (as JD) on wich the moon phase was found.
  927.  
  928.    EXAMPLE
  929.     ...
  930.     jd = GregorianMoonPhase(18,9,1994,FullMoon);
  931.     JDToGregorian(jd,&day,&month,&year);
  932.     ...
  933.  
  934.    NOTES
  935.     The range of this function is unknown for me!
  936.     So use it only from 1583 to 2500.
  937.     This is only a experimental version!
  938.  
  939.    BUGS
  940.     unknown.
  941.  
  942.    SEE ALSO
  943.     MoonMonthAge()
  944.  
  945. Date/GregorianToJD                                         Date/GregorianToJD
  946.  
  947.    NAME
  948.     GregorianToJD -- Returns the JD for a date. (V33)
  949.  
  950.    SYNOPSIS
  951.     jd = GregorianToJD(day,month,year);
  952.     d0           d0   d1    d2
  953.  
  954.     unsigned long GregorianToJD(const unsigned short day,
  955.         const unsigned short month, const int year);
  956.  
  957.    FUNCTION
  958.     Returns the JD for a Gregorian date.
  959.  
  960.    INPUTS
  961.     day      - day of the date to convert
  962.     month    - month of the date to convert
  963.     year     - year of the date to convert
  964.  
  965.    RESULT
  966.     jd - This is the JD
  967.  
  968.    EXAMPLE
  969.     ...
  970.     jd = GregorianToJD(23,1,1994);
  971.     ...
  972.  
  973.    NOTES
  974.     It is better to use this function only from -7 to 3200!
  975.  
  976.    BUGS
  977.     unknown.
  978.  
  979.    SEE ALSO
  980.     GSYearToJD(),GYearToScaliger(),GregorianDayDiff(),JulianToJD(),
  981.     HeisToJD()
  982.  
  983. Date/GregorianWeek                                         Date/GregorianWeek
  984.  
  985.    NAME
  986.     GregorianWeek -- Gets the weeknumber of a specified date. (V33)
  987.  
  988.    SYNOPSIS
  989.     weeknr = GregorianWeek(day,month,year);
  990.       d0            d0   d1   d2
  991.  
  992.     unsigned short GregorianWeek(const unsigned short day,
  993.         const unsigned short month, const int year);
  994.  
  995.    FUNCTION
  996.     GregorianWeek gets the weeknumber for a specified date.
  997.  
  998.    INPUTS
  999.     day   - day of the date
  1000.     month - month of the date
  1001.     year  - year of the date
  1002.  
  1003.    RESULT
  1004.     week - This is the number of the week the specified date lies in.
  1005.         If the first day in a new year is a Friday, Saturday or
  1006.         Sunday, this would be the last week of the last year!
  1007.         If the 29.12. is a Monday, the 30.12. is a Monday or a Tuesday,
  1008.         the 31.12. is a Monday, Tuesday or a Wednesday this is the
  1009.         first week of the next year!
  1010.  
  1011.    EXAMPLE
  1012.     ...
  1013.     weeknr = GregorianWeek(4,10,1582);
  1014.     ...
  1015.  
  1016.    NOTES
  1017.     It is better only to use this function for years from 0 to 3000!
  1018.  
  1019.    BUGS
  1020.     For years < 0 errors could occur.
  1021.  
  1022.    SEE ALSO
  1023.     JulianWeek(),HeisWeek(),GregorianWeekday(),GregorianDayDiff()
  1024.  
  1025. Date/GregorianWeekday                                   Date/GregorianWeekday
  1026.  
  1027.    NAME
  1028.     GregorianWeekday -- Gets the weekday of a specified date. (V33)
  1029.  
  1030.    SYNOPSIS
  1031.     weekday = GregorianWeekday(day,month,year);
  1032.       d0                d0   d1   d2
  1033.  
  1034.     Weekdays GregorianWeekday(const unsigned short day,
  1035.         unsigned short month, int year);
  1036.  
  1037.    FUNCTION
  1038.     GregorianWeekday gets the weekday for a specified date.
  1039.  
  1040.    INPUTS
  1041.     day   - day of the date
  1042.     month - month of the date
  1043.     year  - year of the date
  1044.  
  1045.    RESULT
  1046.     weekday - This result is of type:
  1047.         Weekdays = (dayerr,Monday,Tuesday,Wednesday,Thursday,Friday,
  1048.         Saturday,Sunday);
  1049.         dayerr will show you, that an error occurs!
  1050.  
  1051.    EXAMPLE
  1052.     ...
  1053.     weekday = GregorianWeekday(22,1,1994);
  1054.     if (weekday == dayerr)
  1055.       {
  1056.        ...
  1057.       }
  1058.     ...
  1059.  
  1060.    NOTES
  1061.     It is better only to use this function for years from -7 to 3200!
  1062.     In this version dayerr will only occur for the lost days :)
  1063.  
  1064.    BUGS
  1065.     It's not possible to use years < 0 (for more see JulianWeekday()).
  1066.  
  1067.    SEE ALSO
  1068.     JulianWeekday(),HeisWeekday()
  1069.  
  1070. Date/GregorianYearDays                                 Date/GregorianYearDays
  1071.  
  1072.    NAME
  1073.     GregorianYearDays -- Gives back the number of days in a year. (V33)
  1074.  
  1075.    SYNOPSIS
  1076.     days = GregorianYearDays(year);
  1077.      d0              d0
  1078.  
  1079.     unsigned int GregorianYearDays(const int year);
  1080.  
  1081.    FUNCTION
  1082.     GregorianYearDays gives you back the number of days in
  1083.     a specified year.
  1084.  
  1085.    INPUTS
  1086.     year  - The year in which to count the days.
  1087.  
  1088.    RESULT
  1089.     days - The number of days the year uses.
  1090.  
  1091.    EXAMPLE
  1092.     ...
  1093.     days = GregorianYearDays(1994);
  1094.     printf("Days of 1994 : %d\n",days);
  1095.     ...
  1096.  
  1097.    NOTES
  1098.     It is better only to use this function for years from -7 to 3199!
  1099.  
  1100.    BUGS
  1101.     No known bugs.
  1102.  
  1103.    SEE ALSO
  1104.     GregorianMonthDays(),JulianYearDays(),HeisYearDays()
  1105.  
  1106. Date/GSYearToJD                                               Date/GSYearToJD
  1107.  
  1108.    NAME
  1109.     GSYearToJD -- Calcs the JD from a Scaliger year. (V33)
  1110.  
  1111.    SYNOPSIS
  1112.     jd = GSYearToJD(syear);
  1113.     d0         d0
  1114.  
  1115.     unsigned long GSYearToJD(const unsigned int syear);
  1116.  
  1117.    FUNCTION
  1118.     Returns the Julianday of a Scaliger year.
  1119.  
  1120.    INPUTS
  1121.     syear     - Scaliger year
  1122.  
  1123.    RESULT
  1124.     jd - The Julianday
  1125.  
  1126.    EXAMPLE
  1127.     ...
  1128.     jd = GSYearToJD(4800);
  1129.     ...
  1130.  
  1131.    NOTES
  1132.     It is better to use this function only from 4707 to 7981!
  1133.  
  1134.    BUGS
  1135.     unknown.
  1136.  
  1137.    SEE ALSO
  1138.     JSYearToJD(),HSYearToJD()
  1139.  
  1140. Date/GYearToScaliger                                     Date/GYearToScaliger
  1141.  
  1142.    NAME
  1143.     GYearToScaliger -- Returns the year as Scaliger year. (V33)
  1144.  
  1145.    SYNOPSIS
  1146.     syear = GYearToScaliger(year);
  1147.      d0             d0
  1148.  
  1149.     unsigned int GYearToScaliger(const int year);
  1150.  
  1151.    FUNCTION
  1152.     Returns the Scaliger year.
  1153.  
  1154.    INPUTS
  1155.     year     - Gregorian year
  1156.  
  1157.    RESULT
  1158.     syear - The Scaliger year
  1159.  
  1160.    EXAMPLE
  1161.     ...
  1162.     syear = GYearToScaliger(1994);
  1163.     ...
  1164.  
  1165.    NOTES
  1166.     It is better to use this function only from -7 to 3200!
  1167.  
  1168.    BUGS
  1169.     unknown.
  1170.  
  1171.    SEE ALSO
  1172.     JYearToScaliger(),HYearToScaliger()
  1173.  
  1174. Date/HeisDayDiff                                             Date/HeisDayDiff
  1175.  
  1176.    NAME
  1177.     HeisDayDiff -- Calculates the days between 2 dates. (V33)
  1178.  
  1179.    SYNOPSIS
  1180.     days = HeisDayDiff(day1,month1,year1,day2,month2,year2);
  1181.      d0            d0    d1    d2    d3    d4    d5
  1182.  
  1183.     long HeisDayDiff(const unsigned short day1, unsigned short month1,
  1184.         int year1, const unsigned short day2, unsigned short month2,
  1185.         int year2);
  1186.  
  1187.    FUNCTION
  1188.     HeisDayDiff gives you back the number of days between
  1189.     two specified dates.
  1190.  
  1191.    INPUTS
  1192.     day1   - day of the first date
  1193.     month1 - month of the first date
  1194.     year1  - year of the first date
  1195.     day2   - day of the second date
  1196.     month2 - month of the second month
  1197.     year2  - year of the second date
  1198.  
  1199.    RESULT
  1200.     days - The number of days between the two dates
  1201.         (positive if date1 <= date2).
  1202.  
  1203.    EXAMPLE
  1204.     ...
  1205.     days = HeisDayDiff(18,9,1970,22,1,1994);
  1206.     printf("Age of Kai Hofmann in days : %d\n",days);
  1207.     ...
  1208.  
  1209.    NOTES
  1210.     It is better only to use this function for years from -7 to 8000!
  1211.  
  1212.    BUGS
  1213.     If you use on of the dates 5.10.1582 to 14.10.1582 you will get
  1214.     wrong output because these days don't exist!
  1215.  
  1216.    SEE ALSO
  1217.     HeisLeapYear(),HeisMonthDays(),HeisYearDays(),
  1218.     JulianDayDiff(),GregorianDayDiff()
  1219.  
  1220. Date/HeisDaysAfterWeekday                           Date/HeisDaysAfterWeekday
  1221.  
  1222.    NAME
  1223.     HeisDaysAfterWeekday -- Returns the diff to the wday after. (V33)
  1224.  
  1225.    SYNOPSIS
  1226.     days = HeisDaysAfterWeekday(day,month,year,weekday);
  1227.      d0                 d0   d1   d2     d3
  1228.  
  1229.     unsigned short HeisDaysAfterWeekday(const unsigned short day,
  1230.         const unsigned short month, const int year,
  1231.         const Weekdays weekday);
  1232.  
  1233.    FUNCTION
  1234.     Returns the days to the weekday after the specified date.
  1235.     So if you specify the 22.1.1994 (Saturday) and Thursday
  1236.     you get back 5!
  1237.     If you specify the 22.1.1994 and Saturday you get back 0
  1238.     (the same day)!
  1239.  
  1240.    INPUTS
  1241.     day     - day of the date
  1242.     month   - month of the date
  1243.     year    - year of the date
  1244.     weekday - weekday to search for building difference
  1245.  
  1246.    RESULT
  1247.     days - The days after to the searched weekday.
  1248.  
  1249.    EXAMPLE
  1250.     ...
  1251.     days = HeisDaysAfterWeekday(22,1,1994,Thursday);
  1252.     ...
  1253.  
  1254.    NOTES
  1255.     It is better to use this function only from -7 to 8000!
  1256.  
  1257.    BUGS
  1258.     See HeisWeekday()!
  1259.  
  1260.    SEE ALSO
  1261.     HeisWeekday(),JulianDaysAfterWeekday(),GregorianDaysAfterWeekday()
  1262.  
  1263. Date/HeisDaysBeforeWeekday                         Date/HeisDaysBeforeWeekday
  1264.  
  1265.    NAME
  1266.     HeisDaysBeforeWeekday -- Returns the diff to wday before. (V33)
  1267.  
  1268.    SYNOPSIS
  1269.     days = HeisDaysBeforeWeekday(day,month,year,weekday);
  1270.      d0                  d0  d1    d2    d3
  1271.  
  1272.     unsigned short HeisDaysBeforeWeekday(const unsigned short day,
  1273.         const unsigned short month, const int year,
  1274.         const Weekdays weekday);
  1275.  
  1276.    FUNCTION
  1277.     Returns the days to the weekday before the specified date.
  1278.     So if you specify the 22.1.1994 (Saturday) and Thursday
  1279.     you get back 2!
  1280.     If you specify the 22.1.1994 and Saturday you get back 0
  1281.     (the same day)!
  1282.  
  1283.    INPUTS
  1284.     day     - day of the date
  1285.     month   - month of the date
  1286.     year    - year of the date
  1287.     weekday - weekday to search for building difference
  1288.  
  1289.    RESULT
  1290.     days - The days back to the searched weekday (1-7)
  1291.         If you get back 8 an error occurs!
  1292.  
  1293.    EXAMPLE
  1294.     ...
  1295.     days = HeisDaysBeforeWeekday(22,1,1994,Thursday);
  1296.     ...
  1297.  
  1298.    NOTES
  1299.     It is better to use this function only from -7 to 8000!
  1300.  
  1301.    BUGS
  1302.     See HeisWeekday()!
  1303.  
  1304.    SEE ALSO
  1305.     HeisWeekday(),JulianDaysBeforeWeekday(),GregorianDaysBeforeWeekday()
  1306.  
  1307. Date/HeisDiffDate                                           Date/HeisDiffDate
  1308.  
  1309.    NAME
  1310.     HeisDiffDate -- Returns the date for a diff to another date. (V33)
  1311.  
  1312.    SYNOPSIS
  1313.     HeisDiffDate(day,month,year,diffdays,dday,dmonth,dyear);
  1314.               d0   d1   d2     d3     a0    a1    a2
  1315.  
  1316.     void HeisDiffDate(const unsigned short day,
  1317.         const unsigned short month, const int year, int days,
  1318.         unsigned short *dday, unsigned short *dmonth, int *dyear);
  1319.  
  1320.    FUNCTION
  1321.     Returns the date which lies diffdays before/after the specified date.
  1322.  
  1323.    INPUTS
  1324.     day      - day of the date
  1325.     month    - month of the date
  1326.     year     - year of the date
  1327.     diffdays - difference to the date in days
  1328.  
  1329.    RESULT
  1330.     dday   - Destination day
  1331.     dmonth - Destination month
  1332.     dyear  - Destination year
  1333.  
  1334.    EXAMPLE
  1335.     ...
  1336.     HeisDiffDate(23,1,1994,7,&dday,&dmonth,&dyear);
  1337.     ...
  1338.  
  1339.    NOTES
  1340.     It is better to use this function only from -7 to 8000!
  1341.  
  1342.    BUGS
  1343.     unknown.
  1344.  
  1345.    SEE ALSO
  1346.     HeisDayDiff(),HeisMonthDays(),JulianDiffDate(),GregorianDiffDate()
  1347.  
  1348. Date/HeisEaster                                               Date/HeisEaster
  1349.  
  1350.    NAME
  1351.     HeisEaster -- Returns the date of eastern in a year (V33)
  1352.  
  1353.    SYNOPSIS
  1354.     HeisEaster(year,dday,dmonth);
  1355.             d0   a0    a1
  1356.  
  1357.     void HeisEaster(const int year, unsigned short *dday,
  1358.         unsigned short *dmonth);
  1359.  
  1360.    FUNCTION
  1361.     Returns the date of eastern for a specified year.
  1362.  
  1363.    INPUTS
  1364.     year  - eastern is calculated for this year
  1365.  
  1366.    RESULT
  1367.     dday   - day of easter-Sunday
  1368.     dmonth - month of easter-Sunday
  1369.  
  1370.    EXAMPLE
  1371.     ...
  1372.     HeisEaster(1994,&dday,&dmonth);
  1373.     ...
  1374.  
  1375.    NOTES
  1376.     This is only a dummy to GregorianEaster!
  1377.     Use this only for 31 to 2099!
  1378.  
  1379.    BUGS
  1380.     Unknown.
  1381.  
  1382.    SEE ALSO
  1383.     JulianEaster(),GregorianEaster()
  1384.  
  1385. Date/HeisLeapYear                                           Date/HeisLeapYear
  1386.  
  1387.    NAME
  1388.     HeisLeapYear -- Checks if a year is a leap year. (V33)
  1389.  
  1390.    SYNOPSIS
  1391.     leapyear = HeisLeapYear(year);
  1392.        d0             d0
  1393.  
  1394.     bool HeisLeapYear(const int year);
  1395.  
  1396.    FUNCTION
  1397.     HeisLeapYear checks if a year is a leap year.
  1398.     For years after 1582 see GregorianLeapYear(),
  1399.     The correction from N. Heis says, that all years devideable by
  1400.     3200 are no longer leap years!
  1401.     For years before 1582 see JulianLeapYear().
  1402.  
  1403.    INPUTS
  1404.     year - The year which should be checked (from -32768 to 32767)
  1405.         I think only values from -7 to 32767 are valid, because of
  1406.         the variant that was done on -8 by Augustus and other things!
  1407.  
  1408.    RESULT
  1409.     leapyear - TRUE if the year is a leap year, otherwise false.
  1410.  
  1411.    EXAMPLE
  1412.     ...
  1413.     if (HeisLeapYear(1994))
  1414.       printf("leap year!\n");
  1415.     else
  1416.       printf("no leap year!\n");
  1417.     ...
  1418.  
  1419.    NOTES
  1420.     A year is now 365.2421875 days!
  1421.     Use this function only for values from -7 to 8000!
  1422.  
  1423.    BUGS
  1424.     No known bugs.
  1425.  
  1426.    SEE ALSO
  1427.     JulianLeapYear(),GregorianLeapYear()
  1428.  
  1429. Date/HeisMonthDays                                         Date/HeisMonthDays
  1430.  
  1431.    NAME
  1432.     HeisMonthDays -- Gives back the number of days of a month. (V33)
  1433.  
  1434.    SYNOPSIS
  1435.     days = HeisMonthDays(month,year);
  1436.      d0              d0    d1
  1437.  
  1438.     unsigned short HeisMonthDays(const unsigned short month,
  1439.         const int year);
  1440.  
  1441.    FUNCTION
  1442.     HeisMonthDays gives you back the number of days a month in
  1443.     a specified year has.
  1444.     For the year 1582 and the month 10 there are only 21 days,
  1445.     because of the Gregorian-reform 10 days are deleted from
  1446.     the month (for more - look out for books about this!)
  1447.  
  1448.    INPUTS
  1449.     month - The month from which you want to get the number of days.
  1450.     year  - The year in which the month is.
  1451.  
  1452.    RESULT
  1453.     days - The number of days the month uses, or 0 if you use
  1454.         a wrong month.
  1455.  
  1456.    EXAMPLE
  1457.     ...
  1458.     days = HeisMonthDays(1,1994);
  1459.     printf("Days of January 1994 : %d\n",days);
  1460.     ...
  1461.  
  1462.    NOTES
  1463.     Use this function only for years from -7 to 8000!
  1464.  
  1465.    BUGS
  1466.     See GregorianMonthDays!
  1467.  
  1468.    SEE ALSO
  1469.     HeisLeapYear(),JulianMonthDays(),GregorianMonthDays()
  1470.  
  1471. Date/HeisToJD                                                   Date/HeisToJD
  1472.  
  1473.    NAME
  1474.     HeisToJD -- Returns the JD for a date. (V33)
  1475.  
  1476.    SYNOPSIS
  1477.     jd = HeisToJD(day,month,year);
  1478.     d0          d0   d1    d2
  1479.  
  1480.     unsigned long HeisToJD(const unsigned short day,
  1481.         const unsigned short month, const int year);
  1482.  
  1483.    FUNCTION
  1484.     Returns the JD for a Heis date.
  1485.  
  1486.    INPUTS
  1487.     day      - day of the date to convert
  1488.     month    - month of the date to convert
  1489.     year     - year of the date to convert
  1490.  
  1491.    RESULT
  1492.     jd - This is the JD
  1493.  
  1494.    EXAMPLE
  1495.     ...
  1496.     jd = HeisToJD(23,1,1994);
  1497.     ...
  1498.  
  1499.    NOTES
  1500.     It is better to use this function only from -7 to 3268!
  1501.  
  1502.    BUGS
  1503.     unknown.
  1504.  
  1505.    SEE ALSO
  1506.     HSYearToJD(),HYearToScaliger(),HeisDayDiff(),JulianToJD(),HeisToJD()
  1507.  
  1508. Date/HeisWeek                                                   Date/HeisWeek
  1509.  
  1510.    NAME
  1511.     HeisWeek -- Gets the weeknumber of a specified date. (V33)
  1512.  
  1513.    SYNOPSIS
  1514.     weeknr = HeisWeek(day,month,year);
  1515.       d0           d0  d1    d2
  1516.  
  1517.     unsigned short HeisWeek(const unsigned short day,
  1518.         const unsigned short month, const int year);
  1519.  
  1520.    FUNCTION
  1521.     HeisWeek gets the weeknumber for a specified date.
  1522.  
  1523.    INPUTS
  1524.     day   - day of the date
  1525.     month - month of the date
  1526.     year  - year of the date
  1527.  
  1528.    RESULT
  1529.     week - This is the number of the week the specified date lies in.
  1530.         If the first day in a new year is a Friday, Saturday or
  1531.         Sunday, this would be the last week of the last year!
  1532.         If the 29.12. is a Monday, the 30.12. is a Monday or a Tuesday,
  1533.         the 31.12. is a Monday, Tuesday or a Wednesday this is the
  1534.         first week of the next year!
  1535.  
  1536.    EXAMPLE
  1537.     ...
  1538.     weeknr = HeisWeek(4,10,1582);
  1539.     ...
  1540.  
  1541.    NOTES
  1542.     It is better only to use this function for years from 0 to 8000!
  1543.  
  1544.    BUGS
  1545.     For years < 0 errors could occur.
  1546.  
  1547.    SEE ALSO
  1548.     JulianWeek(),GregorianWeek(),HeisWeekday(),HeisDayDiff()
  1549.  
  1550. Date/HeisWeekday                                             Date/HeisWeekday
  1551.  
  1552.    NAME
  1553.     HeisWeekday -- Gets the weekday of a specified date. (V33)
  1554.  
  1555.    SYNOPSIS
  1556.     weekday = HeisWeekday(day,month,year);
  1557.       d0               d0   d1   d2
  1558.  
  1559.     Weekdays HeisWeekday(const unsigned short day, unsigned short month,
  1560.         int year);
  1561.  
  1562.    FUNCTION
  1563.     HeisWeekday gets the weekday for a specified date.
  1564.  
  1565.    INPUTS
  1566.     day   - day of the date
  1567.     month - month of the date
  1568.     year  - year of the date
  1569.  
  1570.    RESULT
  1571.     weekday - This result is of type:
  1572.         Weekdays = (dayerr,Monday,Tuesday,Wednesday,Thursday,Friday,
  1573.         Saturday,Sunday);
  1574.         dayerr will show you, that an error occurs!
  1575.  
  1576.    EXAMPLE
  1577.     ...
  1578.     weekday = HeisWeekday(22,1,1994);
  1579.     if (weekday == dayerr)
  1580.       {
  1581.        ...
  1582.       }
  1583.     ...
  1584.  
  1585.    NOTES
  1586.     It is better only to use this function for years from -7 to 8000!
  1587.     In this version dayerr will only occur for the lost days :)
  1588.  
  1589.    BUGS
  1590.     It is not possible to use year < 0 (see JulianWeekday() for more).
  1591.  
  1592.    SEE ALSO
  1593.     JulianWeekday(),GregorianWeekday()
  1594.  
  1595. Date/HeisYearDays                                           Date/HeisYearDays
  1596.  
  1597.    NAME
  1598.     HeisYearDays -- Gives back the number of days in a year. (V33)
  1599.  
  1600.    SYNOPSIS
  1601.     days = HeisYearDays(year);
  1602.      d0             d0
  1603.  
  1604.     unsigned int HeisYearDays(const int year);
  1605.  
  1606.    FUNCTION
  1607.     HeisYearDays gives you back the number of days in
  1608.     a specified year.
  1609.  
  1610.    INPUTS
  1611.     year  - The year in which to count the days.
  1612.  
  1613.    RESULT
  1614.     days - The number of days the year uses.
  1615.  
  1616.    EXAMPLE
  1617.     ...
  1618.     days = HeisYearDays(1994);
  1619.     printf("Days of 1994 : %d\n",days);
  1620.     ...
  1621.  
  1622.    NOTES
  1623.     It is better only to use this function for years from -7 to 8000!
  1624.  
  1625.    BUGS
  1626.     No known bugs.
  1627.  
  1628.    SEE ALSO
  1629.     HeisMonthDays(),JulianYearDays(),GregorianYearDays()
  1630.  
  1631. Date/HSYearToJD                                               Date/HSYearToJD
  1632.  
  1633.    NAME
  1634.     HSYearToJD -- Calcs the JD from a Scaliger year. (V33)
  1635.  
  1636.    SYNOPSIS
  1637.     jd = HSYearToJD(syear);
  1638.     d0         d0
  1639.  
  1640.     unsigned long HSYearToJD(const unsigned int syear);
  1641.  
  1642.    FUNCTION
  1643.     Returns the Julianday of a Scaliger year.
  1644.  
  1645.    INPUTS
  1646.     syear     - Scaliger year
  1647.  
  1648.    RESULT
  1649.     jd - The Julianday
  1650.  
  1651.    EXAMPLE
  1652.     ...
  1653.     jd = HSYearToJD(6700);
  1654.     ...
  1655.  
  1656.    NOTES
  1657.     It is better to use this function only from 4707 to 7981!
  1658.     In this version only GSYearToJD() is called, because the
  1659.     Scaliger period is only valid to 3268
  1660.  
  1661.    BUGS
  1662.     unknown.
  1663.  
  1664.    SEE ALSO
  1665.     JSYearToJD(),GSYearToJD()
  1666.  
  1667. Date/HYearToScaliger                                     Date/HYearToScaliger
  1668.  
  1669.    NAME
  1670.     HYearToScaliger -- Returns the year as Scaliger year. (V33)
  1671.  
  1672.    SYNOPSIS
  1673.     syear = HYearToScaliger(year);
  1674.      d0             d0
  1675.  
  1676.     unsigned int HYearToScaliger(const int year);
  1677.  
  1678.    FUNCTION
  1679.     Returns the Scaliger year.
  1680.  
  1681.    INPUTS
  1682.     year     - Heis year
  1683.  
  1684.    RESULT
  1685.     syear - The Scaliger year
  1686.  
  1687.    EXAMPLE
  1688.     ...
  1689.     syear = HYearToScaliger(1994);
  1690.     ...
  1691.  
  1692.    NOTES
  1693.     It is better to use this function only from -7 to 8000!
  1694.  
  1695.    BUGS
  1696.     The Scaliger period is defined to 3268!!!.
  1697.  
  1698.    SEE ALSO
  1699.     JYearToScaliger(),GYearToScaliger()
  1700.  
  1701. Date/JDToGregorian                                         Date/JDToGregorian
  1702.  
  1703.    NAME
  1704.     JDToGregorian -- Returns the Gregorian date for a JD. (V33.095)
  1705.  
  1706.    SYNOPSIS
  1707.     JDToGregorian(jd,day,month,year);
  1708.               d0 a0   a1    a2
  1709.  
  1710.     void JDToGregorian(const unsigned long jd, unsigned short *day,
  1711.         unsigned short *month, int *year);
  1712.  
  1713.    FUNCTION
  1714.     Returns the Gregorian date for a JD.
  1715.  
  1716.    INPUTS
  1717.     jd    - This is the given JD.
  1718.  
  1719.    RESULT
  1720.     day    - Day of the date.
  1721.     month    - Month of the date.
  1722.     year    - Year of the date.
  1723.  
  1724.    EXAMPLE
  1725.     ...
  1726.     JDToGregorian(2299161,&day,&month,&year);
  1727.     ...
  1728.  
  1729.    NOTES
  1730.     It is better to use this function only from 1718867 to 2889835!
  1731.  
  1732.    BUGS
  1733.     unknown.
  1734.  
  1735.    SEE ALSO
  1736.     JDToJulian(),JDToHeis()
  1737.  
  1738. Date/JDToHeis                                                   Date/JDToHeis
  1739.  
  1740.    NAME
  1741.     JDToHeis -- Returns the Heis date for a JD. (V33.095)
  1742.  
  1743.    SYNOPSIS
  1744.     JDToHeis(jd,day,month,year);
  1745.          d0 a0   a1    a2
  1746.  
  1747.     void JDToHeis(const unsigned long jd, unsigned short *day,
  1748.         unsigned short *month, int *year);
  1749.  
  1750.    FUNCTION
  1751.     Returns the Heis date for a JD.
  1752.  
  1753.    INPUTS
  1754.     jd    - This is the given JD.
  1755.  
  1756.    RESULT
  1757.     day    - Day of the date.
  1758.     month    - Month of the date.
  1759.     year    - Year of the date.
  1760.  
  1761.    EXAMPLE
  1762.     ...
  1763.     JDToHeis(2299161,&day,&month,&year);
  1764.     ...
  1765.  
  1766.    NOTES
  1767.     In the moment this is only a dummy to JDToGregorian, so:
  1768.     It is better to use this function only from 1718867 to 2889835!
  1769.  
  1770.    BUGS
  1771.     unknown.
  1772.  
  1773.    SEE ALSO
  1774.     JDToJulian(), JDToGregorian()
  1775.  
  1776. Date/JDToJulian                                               Date/JDToJulian
  1777.  
  1778.    NAME
  1779.     JDToJulian -- Returns the Julian date for a JD. (V33.095)
  1780.  
  1781.    SYNOPSIS
  1782.     JDToJulian(jd,day,month,year);
  1783.            d0 a0   a1    a2
  1784.  
  1785.     void JDToJulian(const unsigned long jd, unsigned short *day,
  1786.         unsigned short *month, int *year);
  1787.  
  1788.    FUNCTION
  1789.     Returns the Julian date for a JD.
  1790.  
  1791.    INPUTS
  1792.     jd    - This is the given JD.
  1793.  
  1794.    RESULT
  1795.     day    - Day of the date.
  1796.     month    - Month of the date.
  1797.     year    - Year of the date.
  1798.  
  1799.    EXAMPLE
  1800.     ...
  1801.     JDToJulian(2299160,&day,&month,&year);
  1802.     ...
  1803.  
  1804.    NOTES
  1805.     It is better to use this function only from 1718867 to 2299160!
  1806.  
  1807.    BUGS
  1808.     unknown.
  1809.  
  1810.    SEE ALSO
  1811.     JDToGregorian(),JDToHeis()
  1812.  
  1813. Date/JDtoMJD                                                     Date/JDtoMJD
  1814.  
  1815.    NAME
  1816.     JDtoMJD -- Switches from JD to MJD. (V33)
  1817.  
  1818.    SYNOPSIS
  1819.     mjd = JDtoMJD(jd);
  1820.     d0          d0
  1821.  
  1822.     unsigned long JDtoMJD(const unsigned long jd);
  1823.  
  1824.    FUNCTION
  1825.     Returns the Modified Julianday of a Julianday.
  1826.  
  1827.    INPUTS
  1828.     jd - Julianday
  1829.  
  1830.    RESULT
  1831.     mjd - The Modified Julianday
  1832.  
  1833.    EXAMPLE
  1834.     ...
  1835.     mjd = JDtoMJD(2449354);
  1836.     ...
  1837.  
  1838.    NOTES
  1839.     none
  1840.  
  1841.    BUGS
  1842.     Only use this function for jd > 2400001, because mjd is only
  1843.     defined for this, otherwise system will crash!
  1844.  
  1845.    SEE ALSO
  1846.     MJDtoJD()
  1847.  
  1848. Date/JDToTime                                                   Date/JDToTime
  1849.  
  1850.    NAME
  1851.     JDToTime -- Returns the real time for a JD time. (V33)
  1852.  
  1853.    SYNOPSIS
  1854.     JDToTime(jd,rhour,rmin,rsec);
  1855.          d0  a0    a1   a2
  1856.  
  1857.     void JDToTime(float jd, unsigned short *rhour, unsigned short *rmin,
  1858.         unsigned short *rsec);
  1859.  
  1860.    FUNCTION
  1861.     Returns the real time for a JD time.
  1862.  
  1863.    INPUTS
  1864.     jd - JD time
  1865.  
  1866.    RESULT
  1867.     rhour - 24 hour real time
  1868.     rmin  - real minutes
  1869.     rsec  - real seconds
  1870.  
  1871.    EXAMPLE
  1872.     ...
  1873.     JDToTime(0.76543,&rhour,&rmin,&rsec);
  1874.     ...
  1875.  
  1876.    NOTES
  1877.     none.
  1878.  
  1879.    BUGS
  1880.     If jd is > 0 (including days) there will be occur arithmetic bugs!
  1881.  
  1882.    SEE ALSO
  1883.     TimeToJD()
  1884.  
  1885. Date/JSYearToJD                                               Date/JSYearToJD
  1886.  
  1887.    NAME
  1888.     JSYearToJD -- Calcs the JD from a Scaliger year. (V33)
  1889.  
  1890.    SYNOPSIS
  1891.     jd = JSYearToJD(syear);
  1892.     d0         d0
  1893.  
  1894.     unsigned long JSYearToJD(const unsigned int syear);
  1895.  
  1896.    FUNCTION
  1897.     Returns the Julianday of a Scaliger year.
  1898.  
  1899.    INPUTS
  1900.     syear     - Scaliger year
  1901.  
  1902.    RESULT
  1903.     jd - The Julianday
  1904.  
  1905.    EXAMPLE
  1906.     ...
  1907.     jd = JSYearToJD(4800);
  1908.     ...
  1909.  
  1910.    NOTES
  1911.     It is better to use this function only from 4707 to 6295!
  1912.  
  1913.    BUGS
  1914.     unknown.
  1915.  
  1916.    SEE ALSO
  1917.     GSYearToJD(),HSYearToJD()
  1918.  
  1919. Date/JulianDayDiff                                         Date/JulianDayDiff
  1920.  
  1921.    NAME
  1922.     JulianDayDiff -- Calculates the days between 2 dates. (V33)
  1923.  
  1924.    SYNOPSIS
  1925.     days = JulianDayDiff(day1,month1,year1,day2,month2,year2);
  1926.      d0              d0    d1    d2    d3    d4    d5
  1927.  
  1928.     long JulianDayDiff(const unsigned short day1, unsigned short month1,
  1929.         int year1, const unsigned short day2, unsigned short month2,
  1930.         int year2);
  1931.  
  1932.    FUNCTION
  1933.     JulianDayDiff gives you back the number of days between
  1934.     two specified dates.
  1935.  
  1936.    INPUTS
  1937.     day1   - day of the first date
  1938.     month1 - month of the first date
  1939.     year1  - year of the first date
  1940.     day2   - day of the second date
  1941.     month2 - month of the second month
  1942.     year2  - year of the second date
  1943.  
  1944.    RESULT
  1945.     days - The number of days between the two dates
  1946.         (positive if date1 <= date2).
  1947.  
  1948.    EXAMPLE
  1949.     ...
  1950.     days = JulianDayDiff(18,9,1970,22,1,1994);
  1951.     printf("Age of Kai Hofmann in days : %d\n",days);
  1952.     ...
  1953.  
  1954.    NOTES
  1955.     It is better only to use this function for years from -7 to 1582!
  1956.  
  1957.    BUGS
  1958.     No known bugs.
  1959.  
  1960.    SEE ALSO
  1961.     JulianLeapYear(),JulianMonthDays(),JulianYearDays(),
  1962.     GregorianDayDiff(),HeisDayDiff()
  1963.  
  1964. Date/JulianDaysAfterWeekday                       Date/JulianDaysAfterWeekday
  1965.  
  1966.    NAME
  1967.     JulianDaysAfterWeekday -- Returns the diff to the wday after. (V33)
  1968.  
  1969.    SYNOPSIS
  1970.     days = JulianDaysAfterWeekday(day,month,year,weekday);
  1971.      d0                   d0   d1   d2     d3
  1972.  
  1973.     unsigned short JulianDaysAfterWeekday(const unsigned short day,
  1974.         const unsigned short month, const int year,
  1975.         const Weekdays weekday);
  1976.  
  1977.    FUNCTION
  1978.     Returns the days to the weekday after the specified date.
  1979.     So if you specify the 22.1.1994 (Saturday) and Thursday
  1980.     you get back 5!
  1981.     If you specify the 22.1.1994 and Saturday you get back 0
  1982.     (the same day)!
  1983.  
  1984.    INPUTS
  1985.     day     - day of the date
  1986.     month   - month of the date
  1987.     year    - year of the date
  1988.     weekday - weekday to search for building difference
  1989.  
  1990.    RESULT
  1991.     days - The days after to the searched weekday.
  1992.  
  1993.    EXAMPLE
  1994.     ...
  1995.     days = JulianDaysAfterWeekday(22,1,1994,Thursday);
  1996.     ...
  1997.  
  1998.    NOTES
  1999.     It is better to use this function only from -7 to 1582!
  2000.  
  2001.    BUGS
  2002.     See JulianWeekday()!
  2003.  
  2004.    SEE ALSO
  2005.     JulianWeekday(),GregorianDaysAfterWeekday(),HeisDaysAfterWeekday()
  2006.  
  2007. Date/JulianDaysBeforeWeekday                     Date/JulianDaysBeforeWeekday
  2008.  
  2009.    NAME
  2010.     JulianDaysBeforeWeekday -- Returns the diff to the wday before. (V33)
  2011.  
  2012.    SYNOPSIS
  2013.     days = JulianDaysBeforeWeekday(day,month,year,weekday);
  2014.      d0                d0  d1    d2    d3
  2015.  
  2016.     unsigned short JulianDaysBeforeWeekday(const unsigned short day,
  2017.         const unsigned short month, const int year,
  2018.         const Weekdays weekday);
  2019.  
  2020.    FUNCTION
  2021.     Returns the days to the weekday before the specified date.
  2022.     So if you specify the 22.1.1994 (Saturday) and Thursday
  2023.     you get back 2!
  2024.     If you specify the 22.1.1994 and Saturday you get back 0
  2025.     (the same day)!
  2026.  
  2027.    INPUTS
  2028.     day     - day of the date
  2029.     month   - month of the date
  2030.     year    - year of the date
  2031.     weekday - weekday to search for building difference
  2032.  
  2033.    RESULT
  2034.     days - The days back to the searched weekday (0-6)
  2035.         If you get back 8 an error occurs!
  2036.  
  2037.    EXAMPLE
  2038.     ...
  2039.     days = JulianDaysBeforeWeekday(22,1,1994,Thursday);
  2040.     ...
  2041.  
  2042.    NOTES
  2043.     It is better to use this function only from -7 to 02.1582!
  2044.  
  2045.    BUGS
  2046.     See JulianWeekday()!
  2047.  
  2048.    SEE ALSO
  2049.     JulianWeekday(),GregorianDaysBeforeWeekday(),HeisDaysBeforeWeekday()
  2050.  
  2051. Date/JulianDiffDate                                       Date/JulianDiffDate
  2052.  
  2053.    NAME
  2054.     JulianDiffDate -- Returns the date for a diff to another date. (V33)
  2055.  
  2056.    SYNOPSIS
  2057.     JulianDiffDate(day,month,year,diffdays,dday,dmonth,dyear);
  2058.             d0   d1   d2     d3     a0    a1    a2
  2059.  
  2060.     void JulianDiffDate(const unsigned short day,
  2061.         const unsigned short month, const int year, int days,
  2062.         unsigned short *dday, unsigned short *dmonth, int *dyear);
  2063.  
  2064.    FUNCTION
  2065.     Returns the date which lies diffdays before/after the specified date.
  2066.  
  2067.    INPUTS
  2068.     day      - day of the date
  2069.     month    - month of the date
  2070.     year     - year of the date
  2071.     diffdays - difference to the date in days
  2072.  
  2073.    RESULT
  2074.     dday   - Destination day
  2075.     dmonth - Destination month
  2076.     dyear  - Destination year
  2077.  
  2078.    EXAMPLE
  2079.     ...
  2080.     JulianDiffDate(23,1,1994,7,&dday,&dmonth,&dyear);
  2081.     ...
  2082.  
  2083.    NOTES
  2084.     It is better to use this function only from -7 to 1582!
  2085.  
  2086.    BUGS
  2087.     unknown.
  2088.  
  2089.    SEE ALSO
  2090.     JulianDayDiff(),JulianMonthDays(),GregorianDiffDate(),HeisDiffDate()
  2091.  
  2092. Date/JulianEaster                                           Date/JulianEaster
  2093.  
  2094.    NAME
  2095.     JulianEaster -- Returns the date of eastern in a year (V33.097)
  2096.  
  2097.    SYNOPSIS
  2098.     JulianEaster(year,dday,dmonth);
  2099.               d0   a0    a1
  2100.  
  2101.     void JulianEaster(const int year, unsigned short *dday,
  2102.         unsigned short *dmonth);
  2103.  
  2104.    FUNCTION
  2105.     Returns the date of eastern for a specified year.
  2106.  
  2107.    INPUTS
  2108.     year  - eastern is calculated for this year
  2109.  
  2110.    RESULT
  2111.     dday   - day of easter-Sunday
  2112.     dmonth - month of easter-Sunday
  2113.  
  2114.    EXAMPLE
  2115.     ...
  2116.     JulianEaster(1994,&dday,&dmonth);
  2117.     ...
  2118.  
  2119.    NOTES
  2120.     Use this only for 31 to 1582!
  2121.  
  2122.    BUGS
  2123.     None.
  2124.  
  2125.    SEE ALSO
  2126.     GregorianEaster(),HeisEaster()
  2127.  
  2128. Date/JulianLeapYear                                       Date/JulianLeapYear
  2129.  
  2130.    NAME
  2131.     JulianLeapYear -- Checks if a year is a leap year. (V33)
  2132.  
  2133.    SYNOPSIS
  2134.     leapyear = JulianLeapYear(year);
  2135.        d0               d0
  2136.  
  2137.     bool JulianLeapYear(const int year);
  2138.  
  2139.    FUNCTION
  2140.     JulianLeapYear checks if a year is a leap year in the julian calendar
  2141.     For years after Chr. it checks if the year is devideable by 4.
  2142.     For years before Chr. a leap year must have a modulo 4 value of 1
  2143.  
  2144.    INPUTS
  2145.     year - The year which should be checked (from -32768 to 32767)
  2146.         I think only values from -7 to 32767 are valid, because of
  2147.         the variant that was done on -8 by Augustus and other things!
  2148.  
  2149.    RESULT
  2150.     leapyear - TRUE if the year is a leap year, otherwise false.
  2151.  
  2152.    EXAMPLE
  2153.     ...
  2154.     if (JulianLeapYear(1994))
  2155.       printf("leap year!\n");
  2156.     else
  2157.       printf("no leap year!\n");
  2158.     ...
  2159.  
  2160.    NOTES
  2161.     A year is 365.25 days long!
  2162.     Use this function only for values from -7 to 1582!
  2163.  
  2164.    BUGS
  2165.     No known bugs.
  2166.  
  2167.    SEE ALSO
  2168.     GregorianLeapYear(),HeisLeapYear()
  2169.  
  2170. Date/JulianMonthDays                                     Date/JulianMonthDays
  2171.  
  2172.    NAME
  2173.     JulianMonthDays -- Gives back the number of days of a month. (V33)
  2174.  
  2175.    SYNOPSIS
  2176.     days = JulianMonthDays(month,year);
  2177.      d0            d0    d1
  2178.  
  2179.     unsigned short JulianMonthDays(const unsigned short month,
  2180.         const int year);
  2181.  
  2182.    FUNCTION
  2183.     JulianMonthDays gives you back the number of days a month in
  2184.     a specified year has.
  2185.  
  2186.    INPUTS
  2187.     month - The month from which you want to get the number of days.
  2188.     year  - The year in which the month is.
  2189.  
  2190.    RESULT
  2191.     days - The number of days the month uses, or 0 if you use
  2192.         a wrong month.
  2193.  
  2194.    EXAMPLE
  2195.     ...
  2196.     days = JulianMonthDays(1,1994);
  2197.     printf("Days of January 1994 : %d\n",days);
  2198.     ...
  2199.  
  2200.    NOTES
  2201.     It is better only to use this function for years from -7 to 09.1582!
  2202.  
  2203.    BUGS
  2204.     No known bugs.
  2205.  
  2206.    SEE ALSO
  2207.     JulianLeapYear(),GregorianMonthDays(),HeisMonthDays()
  2208.  
  2209. Date/JulianToJD                                               Date/JulianToJD
  2210.  
  2211.    NAME
  2212.     JulianToJD -- Returns the JD for a date. (V33)
  2213.  
  2214.    SYNOPSIS
  2215.     jd = JulianToJD(day,month,year);
  2216.     d0        d0   d1    d2
  2217.  
  2218.     unsigned long JulianToJD(const unsigned short day,
  2219.         const unsigned short month, const int year);
  2220.  
  2221.    FUNCTION
  2222.     Returns the JD for a Julian date.
  2223.  
  2224.    INPUTS
  2225.     day      - day of the date to convert
  2226.     month    - month of the date to convert
  2227.     year     - year of the date to convert
  2228.  
  2229.    RESULT
  2230.     jd - This is the JD
  2231.  
  2232.    EXAMPLE
  2233.     ...
  2234.     jd = JulianToJD(23,1,1994);
  2235.     ...
  2236.  
  2237.    NOTES
  2238.     It is better to use this function only from -7 to 1582!
  2239.  
  2240.    BUGS
  2241.     unknown.
  2242.  
  2243.    SEE ALSO
  2244.     JSYearToJD(),JYearToScaliger(),JulianDayDiff(),GregorianToJD(),
  2245.     HeisToJD()
  2246.  
  2247. Date/JulianWeek                                               Date/JulianWeek
  2248.  
  2249.    NAME
  2250.     JulianWeek -- Gets the weeknumber of a specified date. (V33)
  2251.  
  2252.    SYNOPSIS
  2253.     weeknr = JulianWeek(day,month,year);
  2254.       d0            d0    d1   d2
  2255.  
  2256.     unsigned short JulianWeek(const unsigned short day,
  2257.         const unsigned short month, const int year);
  2258.  
  2259.    FUNCTION
  2260.     JulianWeek gets the weeknumber for a specified date.
  2261.  
  2262.    INPUTS
  2263.     day   - day of the date
  2264.     month - month of the date
  2265.     year  - year of the date
  2266.  
  2267.    RESULT
  2268.     week - This is the number of the week the specified date lies in.
  2269.         If the first day in a new year is a Friday, Saturday or
  2270.         Sunday, this would be the last week of the last year!
  2271.         If the 29.12. is a Monday, the 30.12. is a Monday or a Tuesday,
  2272.         the 31.12. is a Monday, Tuesday or a Wednesday this is the
  2273.         first week of the next year!
  2274.  
  2275.    EXAMPLE
  2276.     ...
  2277.     weeknr = JulianWeek(4,10,1582);
  2278.     ...
  2279.  
  2280.    NOTES
  2281.     It is is better only to use this function for years from 0 to 1582!
  2282.  
  2283.    BUGS
  2284.     For years < 0 errors could occur.
  2285.  
  2286.    SEE ALSO
  2287.     GregorianWeek(),HeisWeek(),JulianWeekday(),JulianDayDiff()
  2288.  
  2289. Date/JulianWeekday                                         Date/JulianWeekday
  2290.  
  2291.    NAME
  2292.     JulianWeekday -- Gets the weekday of a specified date. (V33)
  2293.  
  2294.    SYNOPSIS
  2295.     weekday = JulianWeekday(day,month,year);
  2296.       d0             d0   d1   d2
  2297.  
  2298.     Weekdays JulianWeekday(const unsigned short day,
  2299.         unsigned short month, int year);
  2300.  
  2301.    FUNCTION
  2302.     JulianWeekday gets the weekday for a specified date.
  2303.  
  2304.    INPUTS
  2305.     day   - day of the date
  2306.     month - month of the date
  2307.     year  - year of the date
  2308.  
  2309.    RESULT
  2310.     weekday - This result is of type:
  2311.         Weekdays = (dayerr,Monday,Tuesday,Wednesday,Thursday,Friday,
  2312.         Saturday,Sunday);
  2313.         dayerr will show you, that an error occurs!
  2314.  
  2315.    EXAMPLE
  2316.     ...
  2317.     weekday = JulianWeekday(4,10,1582);
  2318.     if (weekday == dayerr)
  2319.       {
  2320.        ...
  2321.       }
  2322.     ...
  2323.  
  2324.    NOTES
  2325.     It is better only to use this function for years from 1 to 02.1582!
  2326.     In this version no dayerr will occur!
  2327.  
  2328.    BUGS
  2329.     For years <= 0 errors could occur, or systemcrashs(?).
  2330.  
  2331.    SEE ALSO
  2332.     GregorianWeekday(),HeisWeekday()
  2333.  
  2334. Date/JulianYearDays                                       Date/JulianYearDays
  2335.  
  2336.    NAME
  2337.     JulianYearDays -- Gives back the number of days in a year. (V33)
  2338.  
  2339.    SYNOPSIS
  2340.     days = JulianYearDays(year);
  2341.      d0               d0
  2342.  
  2343.     unsigned int JulianYearDays(const int year);
  2344.  
  2345.    FUNCTION
  2346.     JulianYearDays gives you back the number of days in
  2347.     a specified year.
  2348.  
  2349.    INPUTS
  2350.     year  - The year in which to count the days.
  2351.  
  2352.    RESULT
  2353.     days - The number of days the year uses.
  2354.  
  2355.    EXAMPLE
  2356.     ...
  2357.     days = JulianYearDays(1994);
  2358.     printf("Days of 1994 : %d\n",days);
  2359.     ...
  2360.  
  2361.    NOTES
  2362.     It is better only to use this function for years from -7 to 1581!
  2363.  
  2364.    BUGS
  2365.     No known bugs.
  2366.  
  2367.    SEE ALSO
  2368.     JulianMonthDays(),GregorianYearDays(),HeisYearDays()
  2369.  
  2370. Date/JYearToScaliger                                     Date/JYearToScaliger
  2371.  
  2372.    NAME
  2373.     JYearToScaliger -- Returns the year as Scaliger year. (V33)
  2374.  
  2375.    SYNOPSIS
  2376.     syear = JYearToScaliger(year);
  2377.      d0             d0
  2378.  
  2379.     unsigned int JYearToScaliger(const int year);
  2380.  
  2381.    FUNCTION
  2382.     Returns the Scaliger year.
  2383.  
  2384.    INPUTS
  2385.     year     - Julian year
  2386.  
  2387.    RESULT
  2388.     syear - The Scaliger year
  2389.  
  2390.    EXAMPLE
  2391.     ...
  2392.     syear = JYearToScaliger(1582);
  2393.     ...
  2394.  
  2395.    NOTES
  2396.     It is better to use this function only from -7 to 1582!
  2397.  
  2398.    BUGS
  2399.     unknown.
  2400.  
  2401.    SEE ALSO
  2402.     GYearToScaliger(),HYearToScaliger()
  2403.  
  2404. Date/LMT                                                             Date/LMT
  2405.  
  2406.    NAME
  2407.     LMT -- Calculates your local time in your timezone (V33)
  2408.  
  2409.    SYNOPSIS
  2410.     secs = LMT(secs,meridian,pos);
  2411.      d0        d0     d1    d2
  2412.  
  2413.     unsigned long LMT(const unsigned long secs,
  2414.         const float meridiandegree, const float posdegree);
  2415.  
  2416.    FUNCTION
  2417.     Calculates your Local Mean Time of your place!
  2418.  
  2419.    INPUTS
  2420.     secs     - Seconds of the running day (hours*3600+min*60+sec)
  2421.     meridian - Degrees of your timezone-meridian
  2422.     pos      - Degrees of your place
  2423.  
  2424.    RESULT
  2425.     secs - Local seconds of the running day
  2426.  
  2427.    EXAMPLE
  2428.     ...
  2429.     secs = LMT(76080,-15.0,-8.923055556);
  2430.     ...
  2431.  
  2432.    NOTES
  2433.     none
  2434.  
  2435.    BUGS
  2436.     No errorcheck, if you put in valid degrees (-180 to +180)
  2437.  
  2438.    SEE ALSO
  2439.  
  2440.  
  2441. Date/MJDtoJD                                                     Date/MJDtoJD
  2442.  
  2443.    NAME
  2444.     MJDtoJD -- Switches from MJD to JD. (V33)
  2445.  
  2446.    SYNOPSIS
  2447.     jd = MJDtoJD(mjd);
  2448.     d0         d0
  2449.  
  2450.     unsigned long MJDtoJD(const unsigned long mjd);
  2451.  
  2452.    FUNCTION
  2453.     Returns the Julianday of a Modified Julianday.
  2454.  
  2455.    INPUTS
  2456.     mjd - Modified Julianday
  2457.  
  2458.    RESULT
  2459.     jd - The Julianday
  2460.  
  2461.    EXAMPLE
  2462.     ...
  2463.     jd = JDtoMJD(49353);
  2464.     ...
  2465.  
  2466.    NOTES
  2467.     none
  2468.  
  2469.    BUGS
  2470.     unknown.
  2471.  
  2472.    SEE ALSO
  2473.     MJDtoJD()
  2474.  
  2475. Date/MonthShortText                                       Date/MonthShortText
  2476.  
  2477.    NAME
  2478.     MonthShortText -- Get the month as short text string. (V33.092)
  2479.  
  2480.    SYNOPSIS
  2481.     maxlen = MonthShortText(month,mtext,lang);
  2482.      d0                       d0   a0    d1
  2483.  
  2484.     unsigned short MonthShortText(unsigned short month, char *mtext,
  2485.         Languages lang);
  2486.  
  2487.    FUNCTION
  2488.     This function gets the short text string for the month-number.
  2489.  
  2490.    INPUTS
  2491.     month - Month to transform into a string.
  2492.     mtext - Pointer to a string to fill in the short month-text.
  2493.     lang  - Language for which you want the short month-text.
  2494.  
  2495.    RESULT
  2496.     maxlen - Maximum possible length for the short month-string, this
  2497.         should help you if you want to justify the string right or if
  2498.         you want to center it (Normal is three!).
  2499.         0 indicates an error!
  2500.  
  2501.    EXAMPLE
  2502.     ...
  2503.     char mtxt[4];
  2504.     ...
  2505.     maxlen = MonthShortText(12,&mtxt,English);
  2506.     ...
  2507.  
  2508.    NOTES
  2509.     Available languages:
  2510.     Locale   : This is an Amiga >= OS2.1 only feature, for <= OS2.0
  2511.                and other systems it will return english text!
  2512.     English
  2513.     Deutsch
  2514.     français : For non ISO8859_Latin1-systems this is called francais!
  2515.     español  : For non ISO8859_Latin1-systems this is called espanol!
  2516.  
  2517.    BUGS
  2518.     In this version there is no check, if there is enough space in
  2519.     wtext!
  2520.  
  2521.    SEE ALSO
  2522.     WeekdayText(),WeekdayShortText(),MonthText()
  2523.  
  2524. Date/MonthText                                                 Date/MonthText
  2525.  
  2526.    NAME
  2527.     MonthText -- Get the month as text string. (V33.091)
  2528.  
  2529.    SYNOPSIS
  2530.     maxlen = MonthText(month,mtext,lang);
  2531.      d0                 d0   a0    d1
  2532.  
  2533.     unsigned short MonthText(unsigned short month, char *mtext,
  2534.         Languages lang);
  2535.  
  2536.    FUNCTION
  2537.     This function gets the text string for the month-number.
  2538.  
  2539.    INPUTS
  2540.     month - Month to transform into a string.
  2541.     mtext - Pointer to a string to fill in the month-text.
  2542.     lang  - Language for which you want the month-text.
  2543.  
  2544.    RESULT
  2545.     maxlen - Maximum possible length for the month-string, this should
  2546.         help you if you want to justify the string right or if you
  2547.         want to center it!
  2548.         0 indicates an error!
  2549.  
  2550.    EXAMPLE
  2551.     ...
  2552.     char mtxt[20];
  2553.     ...
  2554.     maxlen = MonthText(12,&mtxt,English);
  2555.     ...
  2556.  
  2557.    NOTES
  2558.     Available languages:
  2559.     Locale   : This is an Amiga >= OS2.1 only feature, for <= OS2.0
  2560.                and other systems it will return english text!
  2561.     English
  2562.     Deutsch
  2563.     français : For non ISO8859_Latin1-systems this is called francais!
  2564.     español  : For non ISO8859_Latin1-systems this is called espanol!
  2565.  
  2566.    BUGS
  2567.     In this version there is no check, if there is enough space in
  2568.     wtext!
  2569.  
  2570.    SEE ALSO
  2571.     WeekdayText(),WeekdayShortText(),MonthShortText()
  2572.  
  2573. Date/ScaligerYearToG                                     Date/ScaligerYearToG
  2574.  
  2575.    NAME
  2576.     ScaligerYearToG -- Returns the Scaliger year as Gregorian year. (V33)
  2577.  
  2578.    SYNOPSIS
  2579.     year = ScaligerYearToG(syear);
  2580.      d0            d0
  2581.  
  2582.     int ScaligerYearToG(const unsigned int syear);
  2583.  
  2584.    FUNCTION
  2585.     Returns the Gregorian year of a Scaliger year.
  2586.  
  2587.    INPUTS
  2588.     syear     - Scaliger year
  2589.  
  2590.    RESULT
  2591.     year - The Gregorian year
  2592.  
  2593.    EXAMPLE
  2594.     ...
  2595.     year = ScaligerYearToG(6400);
  2596.     ...
  2597.  
  2598.    NOTES
  2599.     It is better to use this function only from 4707 to 7981!
  2600.  
  2601.    BUGS
  2602.     unknown.
  2603.  
  2604.    SEE ALSO
  2605.     ScaligerYearToJ(),ScaligerYearToH()
  2606.  
  2607. Date/ScaligerYearToH                                     Date/ScaligerYearToH
  2608.  
  2609.    NAME
  2610.     ScaligerYearToH -- Returns the Scaliger year as Heis year. (V33)
  2611.  
  2612.    SYNOPSIS
  2613.     year = ScaligerYearToH(syear);
  2614.      d0            d0
  2615.  
  2616.     int ScaligerYearToH(const unsigned int syear);
  2617.  
  2618.    FUNCTION
  2619.     Returns the Heis year of a Scaliger year.
  2620.  
  2621.    INPUTS
  2622.     syear     - Scaliger year
  2623.  
  2624.    RESULT
  2625.     year - The Heis year
  2626.  
  2627.    EXAMPLE
  2628.     ...
  2629.     year = ScaligerYearToH(7000);
  2630.     ...
  2631.  
  2632.    NOTES
  2633.     It is better to use this function only from 4707 to 7981!
  2634.  
  2635.    BUGS
  2636.     unknown.
  2637.  
  2638.    SEE ALSO
  2639.     ScaligerYearToJ(),ScaligerYearToG()
  2640.  
  2641. Date/ScaligerYearToJ                                     Date/ScaligerYearToJ
  2642.  
  2643.    NAME
  2644.     ScaligerYearToJ -- Returns the Scaliger year as Julian year. (V33)
  2645.  
  2646.    SYNOPSIS
  2647.     year = ScaligerYearToJ(syear);
  2648.      d0            d0
  2649.  
  2650.     int ScaligerYearToJ(const unsigned int syear);
  2651.  
  2652.    FUNCTION
  2653.     Returns the Julian year of a Scaliger year.
  2654.  
  2655.    INPUTS
  2656.     syear     - Scaliger year
  2657.  
  2658.    RESULT
  2659.     year - The Julian year
  2660.  
  2661.    EXAMPLE
  2662.     ...
  2663.     year = ScaligerYearToJ(4800);
  2664.     ...
  2665.  
  2666.    NOTES
  2667.     It is better to use this function only from 4707 to 6295!
  2668.  
  2669.    BUGS
  2670.     unknown.
  2671.  
  2672.    SEE ALSO
  2673.     ScaligerYearToG(),ScaligerYearToH()
  2674.  
  2675. Date/SecToTime                                                 Date/SecToTime
  2676.  
  2677.    NAME
  2678.     SecToTime -- Returns the time from seconds (V33)
  2679.  
  2680.    SYNOPSIS
  2681.     SecToTime(secs,hour,min,sec);
  2682.            d0   a0   a1  a2
  2683.  
  2684.     SecToTime(unsigned long secs, unsigned short *hour,
  2685.         unsigned short *min, unsigned short *sec);
  2686.  
  2687.    FUNCTION
  2688.     Gives you back the time from the specified seconds
  2689.  
  2690.    INPUTS
  2691.     secs - Time in seconds
  2692.  
  2693.    RESULT
  2694.     hour - hours (0-23)
  2695.     min  - minutes (0-59)
  2696.     sec  - seconds (0-59)
  2697.  
  2698.    EXAMPLE
  2699.     ...
  2700.     SecToTime(76860,&hour,&min,&sec);
  2701.     ...
  2702.  
  2703.    NOTES
  2704.     Don't forget to convert 24h time to AM/PM time if needed!
  2705.  
  2706.    BUGS
  2707.     No errorcheck, if you use a valid time
  2708.  
  2709.    SEE ALSO
  2710.     TimeToSec()
  2711.  
  2712. Date/TimeToJD                                                   Date/TimeToJD
  2713.  
  2714.    NAME
  2715.     TimeToJD -- Returns the JD for a time. (V33)
  2716.  
  2717.    SYNOPSIS
  2718.     jd = TimeToJD(hour,min,sec);
  2719.     d0           d0   d1  d2
  2720.  
  2721.     float TimeToJD(const unsigned short hour, const unsigned short min,
  2722.         const unsigned short sec);
  2723.  
  2724.    FUNCTION
  2725.     Returns the JD for a specified time.
  2726.  
  2727.    INPUTS
  2728.     hour - hour of the time to convert
  2729.     min  - minute of the time to convert
  2730.     sec  - sec. of the time to convert
  2731.  
  2732.    RESULT
  2733.     jd - This is the JD time
  2734.  
  2735.    EXAMPLE
  2736.     ...
  2737.     jd = TimeToJD(16,33,0);
  2738.     ...
  2739.  
  2740.    NOTES
  2741.     none
  2742.  
  2743.    BUGS
  2744.     There is no check, if the specified time is a valid time!
  2745.  
  2746.    SEE ALSO
  2747.     JDToTime()
  2748.  
  2749. Date/TimeToSec                                                 Date/TimeToSec
  2750.  
  2751.    NAME
  2752.     TimeToSec -- Returns the time in seconds (V33)
  2753.  
  2754.    SYNOPSIS
  2755.     secs = TimeToSec(hour,min,sec);
  2756.      d0          d0   d1  d2
  2757.  
  2758.     unsigned long TimeToSec(const unsigned short hour,
  2759.         const unsigned short min, const unsigned short sec);
  2760.  
  2761.    FUNCTION
  2762.     Gives you back the time in seconds
  2763.  
  2764.    INPUTS
  2765.     hour - hours you want (0-23)
  2766.     min  - minutes you want (0-59)
  2767.     sec  - seconds you want (0-59)
  2768.  
  2769.    RESULT
  2770.     secs - Time in seconds
  2771.  
  2772.    EXAMPLE
  2773.     ...
  2774.     secs = TimeToSec(21,15,00);
  2775.     ...
  2776.  
  2777.    NOTES
  2778.     Don't forget to convert AM/PM time to 24h time!
  2779.  
  2780.    BUGS
  2781.     No errorcheck, if you use a valid time
  2782.  
  2783.    SEE ALSO
  2784.     SecToTime()
  2785.  
  2786. Date/TimeZoneFactor                                       Date/TimeZoneFactor
  2787.  
  2788.    NAME
  2789.     TimeZoneFactor -- Returns the value you have to add to GMT time (V33)
  2790.  
  2791.    SYNOPSIS
  2792.     addhours = TimeZoneFactor(degrees);
  2793.        d0                d0
  2794.  
  2795.     short TimeZoneFactor(const short degree);
  2796.  
  2797.    FUNCTION
  2798.     This gives you the hours you have to add to GMT time,
  2799.     specified on the fact, that a timezone is 15 degrees
  2800.     and that GMT is centered on 0 degrees!
  2801.  
  2802.    INPUTS
  2803.     degrees - Position of timezone you live in
  2804.     (from -180 east to +180 west)
  2805.  
  2806.    RESULT
  2807.     addhours - Time to add to GMT time to get your locale zone time
  2808.         (-12 to +12)
  2809.  
  2810.    EXAMPLE
  2811.     ...
  2812.     addhours = TimeZoneFactor(-8);
  2813.     ...
  2814.  
  2815.    NOTES
  2816.     none
  2817.  
  2818.    BUGS
  2819.     No errorcheck, if you put in valid degrees (-180 to +180)
  2820.     Only full degrees are supportet, keep sure that you
  2821.     round in the right way for 0.x degree places
  2822.     I am not sure about the correct +/- behaviour!!!
  2823.  
  2824.    SEE ALSO
  2825.  
  2826.  
  2827. Date/WeekdayShortText                                   Date/WeekdayShortText
  2828.  
  2829.    NAME
  2830.     WeekdayShortText -- Get the weekday as short text string. (V33.092)
  2831.  
  2832.    SYNOPSIS
  2833.     maxlen = WeekdayShortText(wday,wtext,lang);
  2834.     d0                         d0   a0    d1
  2835.  
  2836.     unsigned short WeekdayShortText(Weekdays wday, char *wtext,
  2837.         Languages lang);
  2838.  
  2839.    FUNCTION
  2840.     This function gets the short text string for the weekday-number.
  2841.  
  2842.    INPUTS
  2843.     wday  - Weekday to transform into a string.
  2844.     wtext - Pointer to a string to fill in the short weekday-text.
  2845.     lang  - Language for witch you want the short weekday-text.
  2846.  
  2847.    RESULT
  2848.     maxlen - Maximum possible length for the weekday-string, this should
  2849.         help you if you want to justify the string right or if you
  2850.         want to center it! (Normal it's two or three!)
  2851.         0 indicates an error!
  2852.  
  2853.    EXAMPLE
  2854.     ...
  2855.     char wtxt[3];
  2856.     ...
  2857.     maxlen = WeekdayShortText(Monday,&wtxt,English);
  2858.     ...
  2859.  
  2860.    NOTES
  2861.     Available languages:
  2862.     Locale   : This is an Amiga >= OS2.1 only feature, for <= OS2.0
  2863.                and other systems it will return english text!
  2864.     English
  2865.     Deutsch
  2866.     français : For non ISO8859_Latin1-systems this is called francais!
  2867.     español  : For non ISO8859_Latin1-systems this is called espanol!
  2868.  
  2869.    BUGS
  2870.     In this version there is no check, if there is enough space in
  2871.     wtext!
  2872.  
  2873.    SEE ALSO
  2874.     WeekdayText(),MonthText(),MonthShortText()
  2875.  
  2876. Date/WeekdayText                                             Date/WeekdayText
  2877.  
  2878.    NAME
  2879.     WeekdayText -- Get the weekday as text string. (V33.091)
  2880.  
  2881.    SYNOPSIS
  2882.     maxlen = WeekdayText(wday,wtext,lang);
  2883.       d0                  d0   a0    d1
  2884.  
  2885.     unsigned short WeekdayText(Weekdays wday, char *wtext,
  2886.         Languages lang);
  2887.  
  2888.    FUNCTION
  2889.     This function gets the text string for the weekday-number.
  2890.  
  2891.    INPUTS
  2892.     wday  - Weekday to transform into a string.
  2893.     wtext - Pointer to a string to fill in the weekday-text.
  2894.     lang  - Language for witch you want the weekday-text.
  2895.  
  2896.    RESULT
  2897.     maxlen - Maximum possible length for the weekday-string, this should
  2898.         help you if you want to justify the string right or if you
  2899.         want to center it!
  2900.         0 indicates an error!
  2901.  
  2902.    EXAMPLE
  2903.     ...
  2904.     char wtxt[20];
  2905.     ...
  2906.     maxlen = WeekdayText(Monday,&wtxt,English);
  2907.     ...
  2908.  
  2909.    NOTES
  2910.     Available languages:
  2911.     Locale   : This is an Amiga >= OS2.1 only feature, for <= OS2.0
  2912.                and other systems it will return english text!
  2913.     English
  2914.     Deutsch
  2915.     français : For non ISO8859_Latin1-systems this is called francais!
  2916.     español  : For non ISO8859_Latin1-systems this is called espanol!
  2917.  
  2918.    BUGS
  2919.     In this version there is no check, if there is enough space in
  2920.     wtext!
  2921.  
  2922.    SEE ALSO
  2923.     MonthText(),WeekdayShortText(),MonthShortText()
  2924.  
  2925.